23.08.2010, 10:38
Hi,
a have a little problem in my script. When I want to compile I have such error:
Here is my code, if you could tell me what's wrong
I hope you'll do it! Thanks.
a have a little problem in my script. When I want to compile I have such error:
Код:
(480) : error 035: argument type mismatch (argument 1)
I hope you'll do it! Thanks.
Код:
new ColorName[6][20] = { {"COLOR_WHITE"}, {"COLOR_FADE1"}, {"COLOR_FADE2"}, {"COLOR_FADE3"}, {"COLOR_FADE4"}, {"COLOR_FADE5"}, };
Код:
if(strcmp(cmd, "/write", true) == 0) { new string[256], tmp[256], kolor; if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "Mode: /write [color-id] [result]"); } kolor = strval(tmp); if (IsPlayerAdmin(playerid)) { new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[256]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_WHITE, "Mode: /write [color-id] [result]"); return 1; } format(string, sizeof(string), "%s", result); Line: 480 SendClientMessageToAll(ColorName[kolor], string); printf("%s", string); } } return 1; }