SA-MP Forums Archive
Get Error on An admin system - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Get Error on An admin system (/showthread.php?tid=136145)



Get Error on An admin system - cssbart - 23.03.2010

I get this error

Код:
C:\Users\Jonny\SAMP\filterscripts\EasyReg.pwn(247) : error 017: undefined symbol "GetPlayerLevel"
C:\Users\Jonny\SAMP\filterscripts\EasyReg.pwn(1052) : error 017: undefined symbol "SetPlayerLevel"
level is the admin level in the script i edited heres the script

EasyReg.zip


Re: Get Error on An admin system - Fabio11 - 23.03.2010

Put this on the top of your script
pawn Код:
stock SetPlayerLevel(playerid, Level)
{
    PlayerInfo[playerid][Level] = Level;
    return 1;
}

stock GetPlayerLevel(playerid)
{
    new Level = PlayerInfo[playerid][Level];
    return Level;
}



Re: Get Error on An admin system - cssbart - 23.03.2010

now i get
Код:
C:\Users\Jonny\SAMP\filterscripts\EasyReg.pwn(145) : warning 219: local variable "Level" shadows a variable at a preceding level
C:\Users\Jonny\SAMP\filterscripts\EasyReg.pwn(145) : warning 203: symbol is never used: "Level"
C:\Users\Jonny\SAMP\filterscripts\EasyReg.pwn(145 -- 153) : warning 219: local variable "Level" shadows a variable at a preceding level
C:\Users\Jonny\SAMP\filterscripts\EasyReg.pwn(153) : warning 204: symbol is assigned a value that is never used: "Level"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.



Re: Get Error on An admin system - Fabio11 - 23.03.2010

My fault. Sorry. Try this:
pawn Код:
stock SetPlayerLevel(playerid, lLevel)
{
    PlayerInfo[playerid][Level] = lLevel;
    return 1;
}

stock GetPlayerLevel(playerid)
{
    return PlayerInfo[playerid][Level];
}



Re: Get Error on An admin system - cssbart - 23.03.2010

thanks now my admin system works


Re: Get Error on An admin system - Fabio11 - 23.03.2010

No Problem