26.11.2010, 11:48
Код:
//===============================================================================================================// if(strcmp(cmd, "/announce", true) == 0) { new length = strlen(cmdtext); if(adminlevel[playerid] < 1 ) return 0; else if(logged[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are not logged in."); else 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_WHITE, "USAGE: /announce [text]"); return 1; } GameTextForAll(result, 5000, 0); new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, MAX_PLAYER_NAME); format(string, sizeof(string), "Admin %s has used /announce command", pName); SendClientMessageToAdmins(COLOR_WHITE, string); return 1; } //===============================================================================================================// if(strcmp(cmd, "/chatannounce", true) == 0) { if(adminlevel[playerid] < 1 ) return 0; else if(logged[playerid] == 0) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use commands because you are not logged in."); else { 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_WHITE, "USAGE: /chatannounce [text]"); return 1; } format(tString,sizeof(tString), " %s", result); SendClientMessageToAll(COLOR_GREEN, "----------------------------------------------------"); SendClientMessageToAll(COLOR_YELLOW,tString); SendClientMessageToAll(COLOR_GREEN, "----------------------------------------------------"); new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, MAX_PLAYER_NAME); format(string, sizeof(string), "Admin %s has used /chatannounce command", pName); SendClientMessageToAdmins(COLOR_WHITE, string); return 1; } }
C:\Documents and Settings\Administrateur\Bureau\httppastebin.combp6 ZSP7A\gamemodes\ZZZZ.pwn(220) : warning 201: redefinition of constant/macro (symbol "SLOTS")
C:\Documents and Settings\Administrateur\Bureau\httppastebin.combp6 ZSP7A\gamemodes\ZZZZ.pwn(1383) : error 017: undefined symbol "string"
C:\Documents and Settings\Administrateur\Bureau\httppastebin.combp6 ZSP7A\gamemodes\ZZZZ.pwn(1383) : error 017: undefined symbol "string"
C:\Documents and Settings\Administrateur\Bureau\httppastebin.combp6 ZSP7A\gamemodes\ZZZZ.pwn(1383) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrateur\Bureau\httppastebin.combp6 ZSP7A\gamemodes\ZZZZ.pwn(1383) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.