09.01.2011, 23:19
Code:
if(!strcmp(cmd, "/giverpp", true))
Code:
warning 217: loose indentation
if(!strcmp(cmd, "/giverpp", true))
warning 217: loose indentation
//============================================[ ROLEPLAY POINT] ==================================================== if(strcmp(cmd, "/giverpp", true) == 0)//mueve esto hacia adelante que quede al raz {//de este if(PlayerInfo[playerid][Level] >= 3) { new tmp[256], player1;//el 'tmp2' no hacia funcion y el 'tmp' no estaba definido tmp = strtok(cmdtext,idx);//aqui no tenia el ';' if(!strlen(tmp)) return SendClientMessage(playerid, yellow, "USAGE: /giverpp [playerid]"); player1 = strval(tmp); if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) { CMDMessageToAdmins(playerid,"GIVERPP"); SaveToFile("Rpp",string); PlayerInfo[player1][Rpp]++; format(string, sizeof(string), "You have given a Roleplay Point To \"%s\"", PlayerName2(player1));//aqui faltaba un ')' SendClientMessage(playerid,yellow,string); if(player1 != playerid) { format(string,sizeof(string),"Administrator \"%s\" has given you a Roleplay Point", PlayerName2(playerid));//aqui tambien un ')' SendClientMessage(player1,yellow,string); SendClientMessageToAll(yellow,"Administrator \"%s\" has given %s a Roleplay Point", PlayerName2(playerid), playerid); PlayerInfo[playerid][Rpp]++; } } else return SendClientMessage(playerid,red,"ERROR: Player is not connected"); } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); return 1; }
Because strcmp is way too old to be used.
We need to see the whole structure of the command(i guess) to tell you, plus it's not an error but a warning. |
new tmp[256], player1;
pwn(4454) : warning 219: local variable "tmp" shadows a variable at a preceding level
No it's not. Where do people come up with these assumptions? Do you even know what strcmp stands for? String compare. If your comparing it to functions like sscanf, then you are an idiot. sscanf and strcmp serve two different purposes. strcmp will compare two strings to each other with or without case sensitivity and return whether they are the same or not. sscanf will compare a string with format codes and parse out values if the string matches the format codes.
|