SA-MP Forums Archive
Help error 01, 029. - 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 error 01, 029. (/showthread.php?tid=337008)



Help error 01, 029. - sanrock - 24.04.2012

Код:
C:\Users\Luke\Downloads\tmp_fm_agame2 (1).pwn(439) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Luke\Downloads\tmp_fm_agame2 (1).pwn(439) : error 029: invalid expression, assumed zero
C:\Users\Luke\Downloads\tmp_fm_agame2 (1).pwn(439) : error 029: invalid expression, assumed zero
Код:
CMD:stats(playerid, params[])
{
    new string[128];
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
	format(string, sizeof(string), "Statistics: %s", pName);
	SendClientMessage(playerid, COLOR_GREY, string);
   	format(string, sizeof(string), "[Stats]": PlayingHours: %s Kills: %i  Deaths: %i Score: %i AdminLevel: %s  VIPLevel: %s",PlayerInfo[playerid][pPlayingTime], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pScore]);
	SendClientMessage(playerid, COLOR_ORANGE, string);
	return 1;
}
Код:
format(string, sizeof(string), "[Stats]": PlayingHours: %s Kills: %i  Deaths: %i Score: %i AdminLevel: %s  VIPLevel: %s",PlayerInfo[playerid][pPlayingTime], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pScore]);
Please help.


Re: Help error 01, 029. - Jikesh - 24.04.2012

Replace it with the following code:

Код:
format(string, sizeof(string), "[Stats]: PlayingHours: %s Kills: %i  Deaths: %i Score: %i AdminLevel: %s  VIPLevel: %s",PlayerInfo[playerid][pPlayingTime], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pScore]);



Re: Help error 01, 029. - Elysian` - 24.04.2012

Quote:
Originally Posted by sanrock
Посмотреть сообщение
Код:
format(string, sizeof(string), "[Stats]": PlayingHours: %s Kills: %i  Deaths: %i Score: %i AdminLevel: %s  VIPLevel: %s",PlayerInfo[playerid][pPlayingTime], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pScore]);
Please look at your code before posting..
Here,
Код:
"[Stats]":
You have an extra " after stats.


Re: Help error 01, 029. - sanrock - 24.04.2012

Thanks for helping.