SA-MP Forums Archive
Undefined Symbol Adminlevel ??? - 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: Undefined Symbol Adminlevel ??? (/showthread.php?tid=531685)



Undefined Symbol Adminlevel ??? - Gogorakis - 14.08.2014

Код:
C:\Users\Administrator\Desktop\KITTENTEST\gamemodes\greekfr.pwn(665) : error 017: undefined symbol "AdminLevel"
C:\Users\Administrator\Desktop\KITTENTEST\gamemodes\greekfr.pwn(669) : error 017: undefined symbol "AdminLevel"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
enum PlayerInfo:
Код:
enum PlayerInfo
{
    Pass[129], //User's password
    Adminlevel, //User's admin level
    VIPlevel, //User's vip level
    Money, //User's money
    Scores, //User's scores
    Kills, //User's kills
    Deaths //User's deaths
}
Line 665:
Код:
	  if(!IsPlayerAdmin(playerid)||pInfo[playerid][AdminLevel]<5)return SendClientMessage(playerid,0xFF0000FF,"You're not authorized to use that command");
Line 669:
Код:
	  pInfo[strval(cmdtext[11])][AdminLevel]=strval(cmdtext[tmpspace+1]);
All cmd:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext[1],"makeadmin",true,9))
	{
	  if(!IsPlayerAdmin(playerid)||pInfo[playerid][AdminLevel]<5)return SendClientMessage(playerid,0xFF0000FF,"You're not authorized to use that command");
	  new tmpspace = strfind(cmdtext," ",true,11);
	  if(!cmdtext[11])return SendClientMessage(playerid,0xFF0000FF,"USAGE: /MakeAdmin <playerid> <admin level>");
	  if(!cmdtext[tmpspace+1])return SendClientMessage(playerid,0xFF0000FF,"USAGE: /MakeAdmin <playerid> <admin level>");
	  pInfo[strval(cmdtext[11])][AdminLevel]=strval(cmdtext[tmpspace+1]);
	  new tmpstring[128];
	  GetPlayerName(strval(cmdtext[11]),tmpstring,MAX_PLAYER_NAME);
	  format(tmpstring,128,"You made %s AdminLevel %d",tmpstring,strval(cmdtext[tmpspace+1]));
	  SendClientMessage(playerid,0xFFFFFFFF,tmpstring);
	  GetPlayerName(playerid,tmpstring,MAX_PLAYER_NAME);
	  format(tmpstring,128,"%s made you AdminLevel %d",tmpstring,strval(cmdtext[tmpspace+1]));
	  return SendClientMessage(strval(cmdtext[11]),0xFFFFFFFF,tmpstring);
	}
	return 0;
}



Re : Undefined Symbol Adminlevel ??? - Adawg - 14.08.2014

Код:
Adminlevel with the l not the L

change the minus l to L all will work



Re: Undefined Symbol Adminlevel ??? - billy123321 - 14.08.2014

Um, in player info it's "Adminlevel", where as the command is "AdminLevel". Notice the different capitalization.

So if you change it it should be all good ...?


Re: Undefined Symbol Adminlevel ??? - Gogorakis - 14.08.2014

What?
Fixed;p
Thanks^^