14.10.2009, 15:20
I get these warnings:
but I don't have them more then once defined on a level
how is it possible that I get this error?
code:
if I /* */ one command, the warnings don't show
Quote:
symbol already defined: "File" local variable "Kills" shadows a variable at a preceding level local variable "KillsName" shadows a variable at a preceding level |
how is it possible that I get this error?
code:
Code:
if(!strcmp(cmd,"/read", true)) { new File[64]= "ScoreList.ini"; if(!xini_exist(File)) { xini_create(File); } new Kills[10][256], KillsName[10][256], KillsValue[10], tmpp[256], idxx, vstring[1]; for(new v=0; v<10; v++) { valstr(vstring, v); Kills[v] = xini_get(File,"Kills",vstring,true); //full string KillsName[v] = strtok(Kills[v], idxx); //name (1st part) tmpp = strtok(Kills[v], idxx); KillsValue[v] = strval(tmpp); //value (2nd part) idxx = 0; format(String, sizeof String, "%s %i", KillsName[v], KillsValue[v]); SendClientMessage(20, COLOR_BASIC, String); } return 1; } if(!strcmp(cmd,"/oread", true)) { new File[64]= "ScoreList.ini"; if(xini_exist(File)) { new Kills[10][256], KillsName[10][256], KillsValue[10], tmpp[256], idxx, vstring[1]; for(new v=0; v<10; v++) { valstr(vstring, v); Kills[v] = xini_get(File,"Kills",vstring,true); //full string KillsName[v] = strtok(Kills[v], idxx); //name (1st part) tmpp = strtok(Kills[v], idxx); KillsValue[v] = strval(tmpp); //value (2nd part) idxx = 0; format(String, sizeof String, "%s %i", KillsName[v], KillsValue[v]); SendClientMessage(20, COLOR_BASIC, String); } format(String, sizeof String, "ScoreList Kills:~n~~n~1: %24s %i~n~2: %24s %i~n~3: %24s %i~n~4: %24s %i~n~5: %24s %i~n~6: %24s %i~n~7: %24s %i~n~8: %24s %i~n~9: %24s %i~n~10: %24s %i~n~", KillsName[0], KillsValue[0], KillsName[1], KillsValue[1], KillsName[2], KillsValue[2], KillsName[3], KillsValue[3], KillsName[4], KillsValue[4], KillsName[5], KillsValue[5], KillsName[6], KillsValue[6], KillsName[7], KillsValue[7], KillsName[8], KillsValue[8], KillsName[9], KillsValue[9]); SendInfoText(playerid, 0, 200, String); PlayerPlaySound(playerid, CheckSound, 0.0, 0.0, 0.0); } else { PlayerPlaySound(playerid, ErrorSound, 0.0, 0.0, 0.0); SendInfoText(playerid, 1200, 103, "~r~Error_o.O"); } return 1; }