28.03.2015, 22:25
I got errors, and I don't know how to fix them. I've been trying to fix it for 1hour...
Errors:
PHP код:
CMD:kick(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new targetplayer, reason[64];
if(sscanf(params, "is[64]", targetplayer, reason))
SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /kick [ID] [REASON]");
}
if(targetplayer == playerid)
{
SendClientMessage(playerid, COLOR_RED, "You cannot kick yourself!");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You kicked X");
SendClientMessage(targetplayer, COLOR_RED, "You have been kicked by admin X for REASON");
Kick(targetplayer);
}
}
else
{
SendClientMessage(playerid, -1, "SERVER: Unknown command.");
}
return 1;
}
PHP код:
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(369) : error 017: undefined symbol "sscanf"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(368) : warning 203: symbol is never used: "targetplayer"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(368 -- 372) : error 017: undefined symbol "targetplayer"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(379) : error 017: undefined symbol "targetplayer"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(380) : error 017: undefined symbol "targetplayer"
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(383) : error 010: invalid function or declaration
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemodes\practice.pwn(387) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.