SA-MP Forums Archive
Help with my gamemode. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with my gamemode. (/showthread.php?tid=387230)



Help with my gamemode. - Hade. - 23.10.2012

Hey, i have a problem but i dont know how to fix it, i have an error if i want to compilte and here it is.


PHP код:
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(411) : error 001expected token"#endif"but found "-end of file-"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Help please.
O and i dont have the 411 row, sorry i am a beginner.


Re: Help with my gamemode. - gtakillerIV - 23.10.2012

Might wanna show us line 400 to line 411 so we can fix it for ya?


Re: Help with my gamemode. - HyDrAtIc - 23.10.2012

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Might wanna show us line 400 to line 411 so we can fix it for ya?
Wrong.

Before the callback OnGamemodeInit you must add this:

PHP код:
#endif 



Re : Help with my gamemode. - DaRk_RaiN - 23.10.2012

Yeah it would be something like this
#include <a_samp>
...................
.................
............
#endif
OnGameModeInIt();


Re: Help with my gamemode. - Hade. - 23.10.2012

James, i dont quite understand where do i add it. Here is the scipt to GamemodeInt

PHP код:
#include <a_samp>
#include <YSI\y_ini>
#include <foreach>
#include <sscanf2>
#include <zcmd>
native WP_Hash(buffer[], len, const str[]);
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Players/%s.ini"
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COLOR_GREEN  0x33AA33AA
#define COLOR_WHITE 0xFFFFFFFF
#if defined PhoenixCarSystem
enum pInfo
{
    
pPass[129],
    
pCash,
    
pAdmin,
    
pKills,
    
pDeaths
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];
new 
pickup;
forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_String("Password",PlayerInfo[playerid][pPass], 129);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 
1;
}
stock UserPath(playerid)
{
    new 
string[128],playername[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,playername,sizeof(playername));
    
format(string,sizeof(string),PATH,playername);
    return 
string;
}
public 
OnGameModeInit()
{
        
SetGameModeText("Nebulos FUN V1");
        
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
        
//----------------------Pickupid-----------------------------//
        
pickup CreatePickup(1316,1,2454.2390,1499.2466,11.5618,0);
        
//----------------------Masinad------------------------------//
        
AddStaticVehicle(444,2039.9304,1319.6042,11.0432,179.5908,20,91); //
        
AddStaticVehicle(562,2039.9293,1335.2542,10.3314,180.3404,59,80); //
        
AddStaticVehicle(407,2040.1682,1364.6359,10.9093,181.5008,57,56); //
        
return 1;




Re: Help with my gamemode. - HyDrAtIc - 23.10.2012

Replace it with this:

PHP код:
#include <a_samp>
#include <YSI\y_ini>
#include <foreach>
#include <sscanf2>
#include <zcmd>

native WP_Hash(buffer[], len, const str[]);

#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4

#define PATH "/Players/%s.ini"

#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COLOR_GREEN  0x33AA33AA
#define COLOR_WHITE 0xFFFFFFFF

#if defined PhoenixCarSystem

enum pInfo
{
    
pPass[129],
    
pCash,
    
pAdmin,
    
pKills,
    
pDeaths
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];

new 
pickup;

forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_String("Password",PlayerInfo[playerid][pPass], 129);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 
1;
}

stock UserPath(playerid)
{
    new 
string[128],playername[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,playername,sizeof(playername));
    
format(string,sizeof(string),PATH,playername);
    return 
string;
}
#endif
public OnGameModeInit()
{
        
SetGameModeText("Nebulos FUN V1");
        
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
        
//----------------------Pickupid-----------------------------//
        
pickup CreatePickup(1316,1,2454.2390,1499.2466,11.5618,0);
        
//----------------------Masinad------------------------------//
        
AddStaticVehicle(444,2039.9304,1319.6042,11.0432,179.5908,20,91); //
        
AddStaticVehicle(562,2039.9293,1335.2542,10.3314,180.3404,59,80); //
        
AddStaticVehicle(407,2040.1682,1364.6359,10.9093,181.5008,57,56); //
        
return 1;




Re: Help with my gamemode. - Hade. - 23.10.2012

Now theres a whole new line of errors :S

PHP код:
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(61) : error 017undefined symbol "pickup"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(84) : error 017undefined symbol "UserPath"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(86) : error 017undefined symbol "UserPath"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(98) : error 017undefined symbol "UserPath"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(101) : error 017undefined symbol "PlayerInfo"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(101) : warning 215expression has no effect
C
:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(101) : error 001expected token";"but found "]"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(101) : error 029invalid expressionassumed zero
C
:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(101) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
8 Errors




Re: Help with my gamemode. - Hade. - 23.10.2012

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Might wanna show us line 400 to line 411 so we can fix it for ya?
Well...

PHP код:
                    ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,""COL_WHITE"Sisselogimine",""COL_RED"Oled sisestanud vale parooli.\n"COL_WHITE"Kirjuta oma password alla, et sisse logida.","Sisene","Lahku");
                }
                
            }
        }
    }
    return 
1;
}
public 
OnPlayerClickPlayer(playeridclickedplayeridsource)
{
        return 
1;

The error line is 413 now


Re: Help with my gamemode. - HyDrAtIc - 23.10.2012

PHP код:
#include <a_samp>
#include <YSI\y_ini>
#include <foreach>
#include <sscanf2>
#include <zcmd>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}

public 
OnFilterScriptExit()
{
    return 
1;
}

#else

main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}

native WP_Hash(buffer[], len, const str[]);

#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4

#define PATH "/Players/%s.ini"

#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COLOR_GREEN  0x33AA33AA
#define COLOR_WHITE 0xFFFFFFFF

#if defined PhoenixCarSystem

enum pInfo
{
    
pPass[129],
    
pCash,
    
pAdmin,
    
pKills,
    
pDeaths
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];

new 
pickup;

forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_String("Password",PlayerInfo[playerid][pPass], 129);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 
1;
}

stock UserPath(playerid)
{
    new 
string[128],playername[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,playername,sizeof(playername));
    
format(string,sizeof(string),PATH,playername);
    return 
string;
}
#endif
public OnGameModeInit()
{
        
SetGameModeText("Nebulos FUN V1");
        
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
        
//----------------------Pickupid-----------------------------//
        
pickup CreatePickup(1316,1,2454.2390,1499.2466,11.5618,0);
        
//----------------------Masinad------------------------------//
        
AddStaticVehicle(444,2039.9304,1319.6042,11.0432,179.5908,20,91); //
        
AddStaticVehicle(562,2039.9293,1335.2542,10.3314,180.3404,59,80); //
        
AddStaticVehicle(407,2040.1682,1364.6359,10.9093,181.5008,57,56); //
        
return 1;




Re: Help with my gamemode. - Hade. - 23.10.2012

Now i have there errors too ....

PHP код:
C:\Users\ilmar\Desktop\NebulosFUN.pwn(85) : error 017undefined symbol "pickup"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(108) : error 017undefined symbol "UserPath"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(110) : error 017undefined symbol "UserPath"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(122) : error 017undefined symbol "UserPath"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(125) : error 017undefined symbol "PlayerInfo"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(125) : warning 215expression has no effect
C
:\Users\ilmar\Desktop\NebulosFUN.pwn(125) : error 001expected token";"but found "]"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(125) : error 029invalid expressionassumed zero
C
:\Users\ilmar\Desktop\NebulosFUN.pwn(125) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
8 Errors