Help please
#1

Could some one help me please i keep getting warnings of this.



Код:
CMD:lootres(playerid)
{
    if(pInfo[playerid][pAdminLevel] >= 6)
	{
		new Survival_RespawnItems;
		}
	return 1;
}
These are the warnings

warning 219: local variable "Survival_RespawnItems" shadows a variable at a preceding level and
warning 203: symbol is never used: "Survival_RespawnItems"
Reply
#2

The variable "Survival_RespawnItems" it's already declared, just change the name of the variable.
You do not use the variable you have declared

The code you've posted simply do nothing, declare a variable, and then ends...
Reply
#3

How to fix:

pawn Код:
 
Your code does nothing and is rendered useless. Delete it.
Reply
#4

could someone then help me for what a command could be for a level 6 admin to respawn items
Reply
#5

You just have to change the name a little because it's already in the script.
pawn Код:
CMD:lootres(playerid)
{
if(pInfo[playerid][pAdminLevel] >= 6)
{
new Survival_RespawnItemsX;
// By the way if you don't use the variable above, you will still get 2nd warning.
}
return 1;
}
Reply
#6

Actually i only get warning 203 now
Reply
#7

Is this your full command , it's useless nothing with that variable 'Survival_RespawnItemsX' you have declare it and didn't use it that's why you got those errors. delete this command it's useless if it's like that.
Reply
#8

CMD:lootres(playerid) Survival_RespawnItems(); This works but i need it for a level 6 admin thats all
Reply
#9

Then you don't have to declare any variable. Just check the level and call Survival_RespawnItems.
pawn Код:
CMD:lootres(playerid)
{
    if (pInfo[playerid][pAdminLevel] >= 6) Survival_RespawnItems();
    return 1;
}
Reply
#10

Thank you So much Pal i owe you 1 Thanks everyone Very quick responses
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)