zcmd 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: zcmd ERROR (
/showthread.php?tid=210114)
zcmd ERROR -
AzTeCaS - 12.01.2011
pawn Код:
COMMAND:givemoney(playerid, params[])
{
if (IsPlayerAdmin(playerid))
{
new
toplayerid, // the player we want to give money to
amount;
// extracting player's ID and amount from params
if (!sscanf(params, "ii", toplayerid, amount))
{
if (toplayerid != INVALID_PLAYER_ID)
{
new
message[40];
GivePlayerMoney(toplayerid, amount);
format(message, sizeof(message), "You got $%d from admin!", amount);
SendClientMessage(toplayerid, 0x00FF00FF, message);
}
else SendClientMessage(playerid, 0xFF0000FF, "That player is not connected");
}
else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /givemoney <playerid> <amount>");
}
else SendClientMessage(playerid, 0xFF0000FF, "Only admins can use this command!");
return 1;
}
Код:
C:\Documents and Settings\Administrateur\Bureau\Dev\gamemodes\Walkies.pwn(274) : error 017: undefined symbol "givemoney"
C:\Documents and Settings\Administrateur\Bureau\Dev\gamemodes\Walkies.pwn(275) : warning 217: loose indentation
C:\Documents and Settings\Administrateur\Bureau\Dev\gamemodes\Walkies.pwn(282) : error 017: undefined symbol "params"
i use sscanf and zcmd
Re: zcmd ERROR -
HyperZ - 12.01.2011
Your codes looks fine
That problem is in ur INC i guess.
and Change:
pawn Код:
if (!sscanf(params, "ii", toplayerid, amount))
To:
pawn Код:
if (!sscanf(params, "ud", toplayerid, amount))
Re: zcmd ERROR -
AzTeCaS - 12.01.2011
same error
Re: zcmd ERROR -
Outcast - 12.01.2011
Where is your "COMMAND:giv...." located? Try moving it to the bottom of the script. Maybe you placed it between two brackets ({ }).