21.08.2012, 11:33
I get the following errors:
For this script
Код:
C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0116.pwn(39383) : error 017: undefined symbol "cmd" C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0116.pwn(39392) : error 017: undefined symbol "string" C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0116.pwn(39392) : error 017: undefined symbol "string" C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0116.pwn(39392) : error 029: invalid expression, assumed zero C:\Documents and Settings\YkZBoY\Desktop\dec-lands\gamemodes\decv0116.pwn(39392) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
Код:
if(strcmp(cmd, "/n", true) == 0) { if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, COLOR_GREY, "You are muted from the newbie chat channel."); return 1; } if(NewbieTimer[playerid] > 0) { format(string, sizeof(string), "You must wait %d between each message.", NewbieTimer[playerid]); SendClientMessage(playerid, COLOR_GREY, string); return 1; } new result[64]; new length = strlen(cmdtext); new offset = idx; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GREEN, "{33CCFF}USAGE:{FFFFFF} /n [text]"); return 1; } if(PlayerInfo[playerid][pAdmin] < 1) { NewbieTimer[playerid] = 30; } if(PlayerInfo[playerid][pAdmin]<1) { format(string, sizeof(string), "** Newbie %s: %s", GetPlayerNameEx(playerid), result); } if(PlayerInfo[playerid][pAdmin] == 1) { format(string, sizeof(string), "** Moderator %s: %s", GetPlayerNameEx(playerid), result); } if(PlayerInfo[playerid][pAdmin] >= 2) { format(string, sizeof(string), "** Admin %s: %s", GetPlayerNameEx(playerid), result); } foreach(Player, n) { SetTimer("NewbTimer", 25000, 0); SendClientMessage(n, COLOR_GREEN, string); } return 1; }