- 0
warning 219: local variable "playerid" shadows a variable at a preceding level
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Kent8Skurt
Salutare, cand compilez gamemode-ul primesc erorile astea
(12542) : warning 219: local variable "playerid" shadows a variable at a preceding level
(12965) : warning 219: local variable "playerid" shadows a variable at a preceding level
(12542):
{ new string[256],playerid; format(string, sizeof(string),"",totalon); TextDrawSetString(TextdrawLstats,string); new year,month,day,hours,minutes,seconds; getdate(year, month, day), gettime(hours, minutes, seconds); format(string, sizeof string, "%s%d.%s%d.%s%d",((day < 10) ? ("0") : ("")), day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year); TextDrawSetString(Date, string); format(string, sizeof string, "%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds); TextDrawSetString(Time, string); if(eventon == 1) { if(giveexp == GetOnLinePlayers()) { foreach(Player,i) { if(gPlayerLogged[i] == 1) { PlayerInfo[i][pExp] += recivedexp; GivePlayerCash(i, recivedmoney); format(string,sizeof(string),"{FFB870}Serverul a atins %d playeri online.",GetOnLinePlayers()); SendClientMessage(i,COLOR_WHITE,string); format(string,sizeof(string),"{FFB870}S-a acordat %s bani si %d puncte de respect.",FormatNumber(recivedmoney),recivedexp); SendClientMessage(i,COLOR_WHITE,string); } } eventon = 0; giveexp += 20; } } SetActorPos(SummerActor,179.0536,-1868.5438,3.0034); SetActorFacingAngle(SummerActor, 273.4916); foreach(Player,k) { if(IsPlayerAFK[k] < 40) { PlayerInfo[k][pPayDay] += 1; } } if(DeelayWar[4] > 0) { DeelayWar[4]--; } if(DeelayWar[5] > 0) { DeelayWar[5]--; } if(DeelayWar[6] > 0) { DeelayWar[6]--; } if(DeelayWar[10] > 0) { DeelayWar[10]--; } if(limitabanuri[playerid] > 0) { limitabanuri[playerid]--; if(banuriinminut[playerid] >= 5) { limitabanuri[playerid] = -1; PlayerInfo[playerid][pAdmin] = 0; mysql_format(SQL, string, sizeof(string), "UPDATE users SET `Admin`='0' WHERE `name`='%s'",PlayerInfo[playerid][pNormalName]); mysql_tquery(SQL,string,"",""); banuriinminut[playerid] = 0; SCM(playerid, COLOR_SERVER, "Protectie: Ai primit remove, deoarece ai executat prea multe banuri intr-un minut."); } }
(12965):
new query[300],playerid,giverid,actionid,actiontime,complaint,reason[64],stringg[256],playername[30],givername[30],var100[300],dm,reason2[64]; //Check panel format(query, sizeof(query), "SELECT * FROM `panelactions`"); new Cache: stringresult = mysql_query(SQL, query); if(cache_get_row_count() > 0) { for(new i, j = cache_get_row_count (); i != j; ++i) { playerid = cache_get_field_content_int(i, "playerid"); giverid = cache_get_field_content_int(i, "giverid"); actionid = cache_get_field_content_int(i, "actionid"); actiontime = cache_get_field_content_int(i, "actiontime"); complaint = cache_get_field_content_int(i, "complaintid"); dm = cache_get_field_content_int(i, "dm"); cache_get_field_content(i, "playername", playername, SQL, sizeof(playername)); cache_get_field_content(i, "givername", givername, SQL, sizeof(givername)); cache_get_field_content(i, "reason", reason, SQL, sizeof(reason)); if(actionid == 1) { if(complaint > 0) { format(stringg,sizeof(stringg),"AdmPanel: %s has been banned by %s for %d days, reason: %s [complaint:%d].",playername,givername,actiontime,reason,complaint); SendClientMessageToAll(COLOR_LIGHTRED, stringg); format(reason2,sizeof(reason2),"%s [complaint:%d]",reason,complaint); } else
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.