SA-MP Forums Archive
Command error. - 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: Command error. (/showthread.php?tid=404572)



Command error. - Affan - 03.01.2013

Command:
pawn Код:
276 CMD:slap(playerid,params[]) {
277    new targetid,Float:pos[3],pNameP[MAX_PLAYER_NAME];
278    //if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"You are not an admin.");
279    if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, -1,"USAGE: /slap [ID/PlayerName]");
280    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,"Player is not connected or wrong id.");
281    GetPlayerPos(targetid,pos[0],pos[1],pos[2]);
282    SetPlayerPos(targetid,pos[0],pos[1],pos[2]+1);
283    GetPlayerName(targetid,pNameP,sizeof(pNameP));
284    format(string,sizeof(stringg),"Player %s was slapped by an admin.");
285    SendClientMessageToAll(COLOR_YELLOW,stringg);
286    return 1;
287}
Error:
pawn Код:
C:\Users\Administrator\Desktop\King\filterscripts\Zcmd.pwn(284) : error 017: undefined symbol "string"
C:\Users\Administrator\Desktop\King\filterscripts\Zcmd.pwn(284) : error 017: undefined symbol "stringg"
C:\Users\Administrator\Desktop\King\filterscripts\Zcmd.pwn(284) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\King\filterscripts\Zcmd.pwn(284) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.



Re: Command error. - aslan890 - 03.01.2013

Go here your answer is there: https://sampforum.blast.hk/showthread.php?tid=316382


Re: Command error. - Affan - 03.01.2013

@Aslan: Thanks fixed it! +1 Rep