12.10.2009, 16:57
hello,
i will make a admin chat but i got 2 errors:
link\test.pwn(122) : error 035: argument type mismatch (argument 1)
link\test.pwn(122) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
lines on the head:
thanks
leuthrick
i will make a admin chat but i got 2 errors:
link\test.pwn(122) : error 035: argument type mismatch (argument 1)
link\test.pwn(122) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/admin", true) == 0 || strcmp(cmdtext, "/a", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]"); return 1; } format(string, sizeof(string), "[OOC] %s: %s " , sendername, result);//line 122 printf("%s", string); } return 1; } return 1; }
Код:
new sendername[MAX_PLAYER_NAME]; new idx; new string; #define COLOR_GRAD2 0xBFC0C2FF
leuthrick