Need help with AdminLevel and VIP Level(urgent)
#1

*Nearly solved* I will post a new thread!
Reply
#2

Well when you defined the admin level on the enum you used
pawn Код:
Adminlevel
And then on the command you used
pawn Код:
pAdminLevel
I'm surprised that that didn't give you errors,try this
pawn Код:
if(PlayerInfo[playerid][AdminLevel] >=3)
Reply
#3

When I do this:

Код:
if(PlayerInfo[playerid][AdminLevel] >=3)
,

I get these errors,

Код:
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\CNRSER~1\GAMEMO~1\Testing.pwn(617) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\CNRSER~1\GAMEMO~1\Testing.pwn(617) : warning 215: expression has no effect
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\CNRSER~1\GAMEMO~1\Testing.pwn(617) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\CNRSER~1\GAMEMO~1\Testing.pwn(617) : error 029: invalid expression, assumed zero
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\CNRSER~1\GAMEMO~1\Testing.pwn(617) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Here is one of the commands,

Код:
CMD:jetpack(playerid,params[])
{
    if(PlayerInfo[playerid][AdminLevel] >=3)
    {
        SetPlayerSpecialAction(playerid, 2);
        SendClientMessage(playerid,COLOR_GREEN, "|__Jetpack Spawned__|");
        return 1;
        }
        else return SendClientMessage(playerid, COLOR_RED, " You are not allowed to use this command");
    }
Reply
#4

Have you declared a new for your enum?

For example:
new pInfo[MAX_PLAYERS][PlayerInfo];
Reply
#5

Yes, I have this right under my enums:

Код:
new pInfo[MAX_PLAYERS][PlayerInfo];
Please help
Reply
#6

Well there you go. You're using
if(PlayerInfo[playerid][AdminLevel] >=3)
whereas this should be:
if(pInfo[playerid][AdminLevel] >=3)

I believe that's causing the first error it's giving you.
Reply
#7

Then I get this:

Код:
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\CNRSER~1\GAMEMO~1\Testing.pwn(617) : error 017: undefined symbol "AdminLevel"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Which is weird, cos I have already defined

Код:
AdminLevel
in my Enum!

Please help
Reply
#8

No, you defined Adminlevel, not AdminLevel
Just change
if(pInfo[playerid][AdminLevel] >=3)
to
if(pInfo[playerid][Adminlevel] >=3)


Now it's all fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)