SA-MP Forums Archive
whats wrong? - 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: whats wrong? (/showthread.php?tid=243585)



whats wrong? - hadzx - 23.03.2011

whats wrong why am i getting these errors


Код:
dcmd_hkill(playerid,params[])
{
	new id[128];
	if(PInfo[playerid][Level] >= 3)
	{
	    if(sscanf(params,"us[128]",id)) return SendClientMessage(playerid,red,"USAGE: /hkill [playerid]");
line 941  else if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid,red,"ERROR: Player disconncted / invalid player ID");
		else
		{
			new Float:x, Float:y, Float:z;
	    	GetPlayerPos(id,x,y,z);
	    	CreateExplosion(x,y,z,6,5);
	    	GameTextForPlayer(id,"~n~~n~~n~~n~~n~~p~Struck Down By The Hand Of God", 8000, 3);
		    SetPlayerHealth(id,0);
		    new pname[MAX_PLAYER_NAME];
    		GetPlayerName(playerid, pname, sizeof(pname));
   			format(mstring,sizeof(mstring),"%s Has Been Killed By The Hand Of God",pname);
			SendClientMessageToAll(0xAAAAAAAA, mstring);
		}
	}
	else return SendClientMessage(playerid,red,"Your Not Allowed To Use This Command!");
	return 1;
}
and the errors

Код:
C:\Users\Stephen-Laptop\Desktop\jadmin.pwn(941) : error 035: argument type mismatch (argument 1)
C:\Users\Stephen-Laptop\Desktop\jadmin.pwn(945) : error 035: argument type mismatch (argument 1)
C:\Users\Stephen-Laptop\Desktop\jadmin.pwn(947) : error 035: argument type mismatch (argument 1)
C:\Users\Stephen-Laptop\Desktop\jadmin.pwn(948) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: whats wrong? - TheSatan - 23.03.2011

line 937 =)


Re: whats wrong? - hadzx - 23.03.2011

thanks lol im so stupid >_<


Re: whats wrong? - TheSatan - 23.03.2011

pawn Код:
new id; // line 937
and
pawn Код:
sscanf(params,"ui",id) // line 940