SA-MP Forums Archive
[SOLVED] /adminize compile errors - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] /adminize compile errors (/showthread.php?tid=90386)



[SOLVED] /adminize compile errors - Antonio [G-RP] - 07.08.2009

Theres some errors with my 'make admin' command!

I think it has to do with 'new result[256];' under 'OnPlayerCommandText'

pawn Код:
if (strcmp(cmd, "/adminize", true) == 0)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAY, "[!] USAGE: /adminize [playerid] [admin level]");
return 1;
}
new level;
new playa = strval(tmp);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
level = strval(tmp);
if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 5)
{
format(string, sizeof(string), "[!] Admin %s has promoted you to a level %s admin!"sendername, result); //LINE 360 !!
SendClientMessage(playa, COLOR_GREEN, string);
format(string, sizeof(string), "[!] You have promoted %s to a level %s admin!"giveplayr, result);
SendClientMessage(playerid, COLOR_GREEN, string);
PlayerInfo[playa][pAdmin] = level;
}
return 1;
}
Код:
C:\Users\Lachlan\Desktop\Random Pawno\AntonioRP.pwn(360) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Lachlan\Desktop\Random Pawno\AntonioRP.pwn(360) : warning 215: expression has no effect
C:\Users\Lachlan\Desktop\Random Pawno\AntonioRP.pwn(360) : warning 215: expression has no effect
C:\Users\Lachlan\Desktop\Random Pawno\AntonioRP.pwn(360) : error 001: expected token: ";", but found ")"
C:\Users\Lachlan\Desktop\Random Pawno\AntonioRP.pwn(360) : error 029: invalid expression, assumed zero
C:\Users\Lachlan\Desktop\Random Pawno\AntonioRP.pwn(360) : fatal error 107: too many error messages on one line
Thanks in advance


Re: /adminize compile errors - Popo2006 - 07.08.2009

You need a comma after the end of the strings (Change "blabla to ", blabla).


Re: /adminize compile errors - Hecky - 07.08.2009

format(string, sizeof(string), "[!] Admin %s has promoted you to a level %s admin!", sendername, result); //LINE 360 !!

try that


Re: /adminize compile errors - Antonio [G-RP] - 07.08.2009

Lmfao, thanks guys. Simple mistakes that change the world