01.09.2013, 14:09
So these are the errors, I get.
I typed "// Error" at the end of the lines that cause the errors.
PHP код:
C:\Users\ъеош\Desktop\Server\gamemodes\Test.pwn(228) : error 035: argument type mismatch (argument 1)
C:\Users\ъеош\Desktop\Server\gamemodes\Test.pwn(230) : error 035: argument type mismatch (argument 1)
C:\Users\ъеош\Desktop\Server\gamemodes\Test.pwn(232) : error 035: argument type mismatch (argument 1)
C:\Users\ъеош\Desktop\Server\gamemodes\Test.pwn(235) : error 035: argument type mismatch (argument 1)
PHP код:
CMD:slap(playerid, params[])
{
new id[50];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "[Error] You are not authorised to use this command!");
else if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage] /slap [User ID]");
else
{
new Float:x,
Float:y,
Float:z,
name[MAX_PLAYER_NAME+1],
name2[MAX_PLAYER_NAME+1],
message[84];
GetPlayerPos(id, x, y, z); // Error one.
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, name2, sizeof(name2)); // Error two.
format(message, sizeof(message), "[Info] You were slapped by the administrator %s.", name);
SendClientMessage(id, COLOR_WHITE, message); // Error three.
format(message, sizeof(message), "[SUCCESS] You just slapped %s.", name2);
SendClientMessage(playerid, COLOR_WHITE, message);
SetPlayerPos(id, x, y, z + 5); // Error four.
}
return 1;
}