SA-MP Forums Archive
Argument mismatch while it's not - 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: Argument mismatch while it's not (/showthread.php?tid=613394)



Argument mismatch while it's not - justjamie - 27.07.2016

Hello.
I get a argument mismatch, while i filled in every argument.
PHP код:
//command
COMMAND:spawn(playeridparams[])
{
    if(!
Player[playerid][Authed]) return SendClientError(playerid"You are not authed!");
    if(!
Player[playerid][Admin]) return SendClientError(playerid,"You are not authorized to use this command!");
    new 
target[35];
    if(
sscanf(params"d"target)) return SendClientUsage(playerid"/spawn [playerid]");
    
pushRespawn(target);
    return 
1;

PHP код:
// the stock
pushRespawn(playerid)
{
SetSpawnInfo(playerid0Player[playerid][Skin], 1743.2271, -1855.396713.41400.0000000000);
SpawnPlayer(playerid);
return 
1;




Re: Argument mismatch while it's not - VVWVV - 27.07.2016

pawn Код:
//command
COMMAND:spawn(playerid, params[])
{
    if(!Player[playerid][Authed]) return SendClientError(playerid, "You are not authed!");
    if(!Player[playerid][Admin]) return SendClientError(playerid,"You are not authorized to use this command!");
    new targetid;
    if(sscanf(params, "d", targetid)) return SendClientUsage(playerid, "/spawn [playerid]");
    pushRespawn(targetid);
    return 1;
}