21.05.2016, 20:27
Код:
public OnPlayerConnect(playerid) { gPlayer_Duty[playerid] = 1; } CMD:aod(pid,params[]) { if(!IsPlayerAdmin(pid)) return SCM(pid, COLOR_RED, ADMIN_MESSAGE); new aod[65], name[MAX_PLAYER_NAME]; GetPlayerName(pid, name, MAX_PLAYER_NAME); if(!gPlayer_Duty[playerid]) { SPH(pid, 99999); SetPlayerArmour(pid, 100); format(aod, sizeof aod, "Admin %s is now on duty. Use /report for any assistance.", name); SCMToAll(COLOR_LIME, aod); gPlayer_Duty[playerid] = 1; } else { SPH(pid, 100); SetPlayerArmour(pid, 0); } format(aod, sizeof aod, "Admin %s is no longer on duty.", name); SCMToAll(COLOR_BLUE, aod); gPlayer_Duty[playerid] = 0; } return 1; } }
Код:
C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(389) : error 021: symbol already defined: "OnPlayerConnect" C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(391) : warning 209: function "OnPlayerConnect" should return a value C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(419) : warning 209: function "cmd_aod" should return a value C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(420) : error 010: invalid function or declaration
only the invalid function or declaration and warnings are the problems now.