Need help.... (error 001: expected token: "-string end-", but found "-identifier-") - 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: Need help.... (error 001: expected token: "-string end-", but found "-identifier-") (
/showthread.php?tid=418897)
Need help.... (error 001: expected token: "-string end-", but found "-identifier-") -
Scrillex - 26.02.2013
Код:
: error 001: expected token: "-string end-", but found "-identifier-"
: warning 215: expression has no effect
: error 001: expected token: ";", but found ")"
: error 029: invalid expression, assumed zero
: fatal error 107: too many error messages on one line
So here is my saving ... Just thinking whats wrong.. And why I get thous errors!
pawn Код:
#define GangPath "LASRP/GANGS/%s.ini"
enum GangInfo
{
GangName,
GangLeader,
Rank,
Rank1,
Rank2,
Rank3,
Rank4,
Rank5,
Rank6
}
new gInfo[MAX_PLAYERS][GangInfo];
public OnPlayerLogin(playerid)
{
if(fexist(GangPath(playerid))) //this line
{
INI_ParseFile(GangPath(playerid),"loadagangccount_user", .bExtra = true, .extra = playerid);
}
}
/*-----------------------------------------[Gangs]----------------------------*/
forward loadagangccount_user(playerid, 1name[], value[]);
public loadagangccount_user(playerid, 1name[], value[])
{
INI_Int("GangName",gInfo[playerid][GangName]);
INI_Int("GangLeader",gInfo[playerid][GangLeader]);
INI_Int("Rank",gInfo[playerid][Rank]);
INI_Int("Rank1",gInfo[playerid][Rank1]);
INI_Int("Rank2",gInfo[playerid][Rank2]);
INI_Int("Rank3",gInfo[playerid][Rank3]);
INI_Int("Rank4",gInfo[playerid][Rank4]);
INI_Int("Rank5",gInfo[playerid][Rank5]);
INI_Int("Rank6",gInfo[playerid][Rank6]);
return 1;
}
stock GangPath(playerid)
{
new str1[128],name1[MAX_PLAYER_NAME];
GetPlayerName(playerid,name1,sizeof(name1));
format(str1,sizeof(str1)GangPath,name);
return str1;
}
Re: Need help.... (error 001: expected token: "-string end-", but found "-identifier-") -
dannyk0ed - 26.02.2013
pawn Код:
if(fexist(GangPath(playerid)))
Should be only ))
Re: Need help.... (error 001: expected token: "-string end-", but found "-identifier-") -
Scrillex - 26.02.2013
Still same! I think something is wrong with stock GangPath.. Just I have Stock Path too.. and I'm just using the same vareables then it.. only with str1 and etc...
Re: Need help.... (error 001: expected token: "-string end-", but found "-identifier-") -
Scrillex - 26.02.2013
I think because I have this Sorry for bumping but it's really needed right now...
pawn Код:
stock Path(playerid)
{
new str[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),UserPath,name);
return str;
}