10.04.2013, 16:18
I did use zcmd before, but now I'm trying to learn strcmp, so I wanted to convert this to strcmp
And I got it like this (dont know if it is right)
And I get 4 errors.
Could anyone tell me what I did wrong, since I am new into this?
pawn Код:
CMD:cc(playerid, params[])
{
if(APlayerData[playerid][PlayerLevel] >= 1 || IsPlayerAdmin(playerid))
{
for(new i = 0; i < 100; i++)
{
SendClientMessageToAll(-1, " ");
}
SendClientMessageToAll(0x0079F2FF,"Chat Cleared!");
}
return 1;
}
pawn Код:
if(strcmp("/cc",cmdtext,true,3) == 0)
{
if(!IsPlayerAdmin(playerid))
{
for(new i = 0; i < 100; i++)
{
SendClientMessageToAll(-1, " ");
}
SendClientMessageToAll(0x0079F2FF,"Chat Cleared!");
}
return 1;
}
Код:
C:\Users\Documents\Gamemode Testing\gamemodes\Gamemode.pwn(480) : error 010: invalid function or declaration C:\Users\Documents\Gamemode Testing\gamemodes\Gamemode.pwn(482) : error 010: invalid function or declaration C:\Users\Documents\Gamemode Testing\gamemodes\Gamemode.pwn(484) : error 010: invalid function or declaration C:\Users\Documents\Gamemode Testing\gamemodes\Gamemode.pwn(490) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.