Whats Missing?
#1

Ok, so im trying to add classes, and this is what i have:


public OnPlayerRequestClass(playerid, classid)
{
// With this you save the chosen class number into pClass[playerid]
pClass[playerid] = classid;
return 1;
}



But, when i try to compile, it gives a error for pClass[playerid] = classid;


Can someone tell me whats wrong?
Reply
#2

put
pawn Код:
new pClass[MAX_PLAYERS];
at the top
Reply
#3

that is there, but it still says..
Reply
#4

If anyones wondering, this is the error it shows:

: error 017: undefined symbol "pClass"
: warning 215: expression has no effect
: error 001: expected token: ";", but found "]"
: error 029: invalid expression, assumed zero
: fatal error 107: too many error messages on one line
Reply
#5

Bump,

Anyone please?!?!?
Reply
#6

Thats strange... it works for me :l

All i put was
pawn Код:
//Top of Script
new pClass[MAX_PLAYERS];
and
pawn Код:
//RequestClass
public OnPlayerRequestClass(playerid, classid)
{
    pClass[playerid] = classid;
    //I had other stuff here lol
    return 1;
}
I D K what you did wrong if that doesn't work :l
Reply
#7

Hmm, try using SetPVarInt(playerid,"pClass",classid);
and get it using GetPVarInt(playerid,"pClass");

Hope I helped u out!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)