Help please - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help please (
/showthread.php?tid=483187)
Help please -
Jivvles - 24.12.2013
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"
Re: Help please -
Sk1lleD - 24.12.2013
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...
Re: Help please -
ConnorHunter - 24.12.2013
How to fix:
Your code does nothing and is rendered useless. Delete it.
Re: Help please -
Jivvles - 24.12.2013
could someone then help me for what a command could be for a level 6 admin to respawn items
Re: Help please -
Tayab - 24.12.2013
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;
}
Re: Help please -
Jivvles - 24.12.2013
Actually i only get warning 203 now
Re: Help please -
SilentSoul - 24.12.2013
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.
Re: Help please -
Jivvles - 24.12.2013
CMD:lootres(playerid) Survival_RespawnItems(); This works but i need it for a level 6 admin thats all
Re: Help please -
Konstantinos - 24.12.2013
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;
}
Re: Help please -
Jivvles - 24.12.2013
Thank you So much Pal i owe you 1
Thanks everyone Very quick responses