05.06.2017, 23:25
Alright, now I will send the full code related to the cmd and the warnings/errors and the lines with errors/warnings..
Warnings+1 error :
enums
cmds
Under OnGameModeInIt I've added this to change the type of "Pending GMX" to "Implemented" after a GMX.
I hope someone will respond quickly.
Warnings+1 error :
Quote:
F:\SA-MP server\credit goes to mason\ogg\gamemodes\oggrp26.pwn(61841) : warning 213: tag mismatch F:\SA-MP server\credit goes to mason\ogg\gamemodes\oggrp26.pwn(61841) : warning 205: redundant code: constant expression is zero F:\SA-MP server\credit goes to mason\ogg\gamemodes\oggrp26.pwn(61847) : warning 213: tag mismatch F:\SA-MP server\credit goes to mason\ogg\gamemodes\oggrp26.pwn(61847) : warning 205: redundant code: constant expression is zero F:\SA-MP server\credit goes to mason\ogg\gamemodes\oggrp26.pwn(61853) : warning 213: tag mismatch F:\SA-MP server\credit goes to mason\ogg\gamemodes\oggrp26.pwn(61853) : warning 205: redundant code: constant expression is zero F:\SA-MP server\credit goes to mason\ogg\gamemodes\oggrp26.pwn(61875) : warning 211: possibly unintended assignment F:\SA-MP server\credit goes to mason\ogg\gamemodes\oggrp26.pwn(61881) : warning 211: possibly unintended assignment F:\SA-MP server\credit goes to mason\ogg\gamemodes\oggrp26.pwn(61887) : warning 211: possibly unintended assignment F:\SA-MP server\credit goes to mason\ogg\gamemodes\oggrp26.pwn(142983) : warning 211: possibly unintended assignment F:\SA-MP server\credit goes to mason\ogg\gamemodes\oggrp26.pwn(142983) : error 036: empty statement |
Код:
enum updateinfo { updatetype, updateimplemented, updatebug, updatepending, updatetext, }; new UpdateInfo[MAX_UPDATES][updateinfo];
Код:
CMD:addupdate(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 99999) { if(sscanf(params, "s[50]d", updatetext, updatetype)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /addupdate [text] [Update Type]"); { SendClientMessageEx(playerid, COLOR_GREY, "Available Types: 1 = Implemented, 2= Bug Fix, 3= Pending GMX"); } for(new i = 0; i < MAX_UPDATES; i++) { if(updatetype == 1)//LINE 61841 { UpdateInfo[i][updatetype] = UpdateInfo[i][updateimplemented]; SendClientMessageToAll(COLOR_RED, "A new update was added!(/updates)"); return 1; } if(updatetype == 2)//LINE 61847 { UpdateInfo[i][updatetype] = UpdateInfo[i][updatebug]; SendClientMessageToAll(COLOR_RED, "A new update was added!(/updates)"); return 1; } if(updatetype == 3)//LINE 61853 { UpdateInfo[i][updatetype] = UpdateInfo[i][updatepending]; SendClientMessageToAll(COLOR_RED, "A new update was added!(/updates)"); return 1; } else if(PlayerInfo[playerid][pAdmin] < 99999) { SendClientMessageToAll(COLOR_GREY, "ERROR: You are not authorized to use this command!"); } } } return 1; } CMD:updates(playerid, params[]) { new string[128]; new string2[50]; for(new i = 0; i < MAX_UPDATES; i++) { SendClientMessageEx(playerid, COLOR_RED, "********* Nyakos City Roleplay Updates ************"); format(string, sizeof(string), "Version: %s", SERVER_GM_TEXT); SendClientMessageEx(playerid, COLOR_YELLOW, string); if(UpdateInfo[i][updatetype] = UpdateInfo[i][updateimplemented])//LINE 61875 { format(string2, sizeof(string2), "{#00b300][Implemented]{#00b300} %s", updatetext); SendClientMessageEx(playerid, COLOR_WHITE, string2); return 1; } if(UpdateInfo[i][updatetype] = UpdateInfo[i][updatebug])//LINE 61881 { format(string2, sizeof(string2), "{#ff0000}[Bug Fix]{#ff0000} %s", updatetext); SendClientMessageEx(playerid, COLOR_WHITE, string2); return 1; } if(UpdateInfo[i][updatetype] = UpdateInfo[i][updatepending])//61887 { format(string2, sizeof(string2), "{#ff3300}[Pending GMX]{#ff3300} %s", updatetext); SendClientMessage(playerid, COLOR_WHITE, string2); return 1; } SendClientMessageEx(playerid, COLOR_RED, "___________________________________________________"); } return 1; }
Код:
for(new u; u != MAX_UPDATES; u++) { if(UpdateInfo[u][updatetype] = UpdateInfo[u][updatepending]);//LINE 142983 { return UpdateInfo[u][updatetype] == UpdateInfo[u][updateimplemented]; } }