Undefined Symbol Adminlevel ???
#1

Код:
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;
}
Reply
#2

Код:
Adminlevel with the l not the L

change the minus l to L all will work
Reply
#3

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 ...?
Reply
#4

What?
Fixed;p
Thanks^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)