14.08.2013, 01:12
I dont know how to use it as a If statement
My code
Errors that I get...
My code
pawn Код:
enum pInfo
{
pPass[129],
pFirstStart
}
new PlayerInfo[MAX_PLAYERS][pInfo];
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("StartPackage",PlayerInfo[playerid][pFirstStart]);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Player Data");
INI_WriteInt(File,"StartPackage",PlayerInfo[playerid][pFirstStart]);
INI_Close(File);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(gPlayerClass[playerid] == Blah1)
{
if(FirstStart[playerid][pFirstStart] == 0)//problem here
{
//does something
}
else
{
if(FirstStart[playerid][pFirstStart] == 1)//problem here
{
//does something
}
}
else if(gPlayerClass[playerid] == Blah2)
{
if(FirstStart[playerid][pFirstStart] == 0)//problem here
{
//does something
}
else
{
if(FirstStart[playerid][pFirstStart] == 1)//problem here
{
//does something
}
}
return 1;
}
Код:
(769) : error 001: expected token: ")", but found "[" (769) : error 029: invalid expression, assumed zero (769) : warning 215: expression has no effect (769) : error 001: expected token: ";", but found "]" (769) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.