number of arguments does not match definition
#1

hi
pawn Код:
stock GetClassName(playerid, classid)
{
    new ClassName[MAX_PLAYERS];
    if(classid == 0) SetPVarString(playerid, "JobName", "Terrorist");
    if(classid == 1) SetPVarString(playerid, "JobName", "Hitman");
    if(classid == 2) SetPVarString(playerid, "JobName", "Weapon Dealer");
    if(classid == 3) SetPVarString(playerid, "JobName", "Rapist");

    return GetPVarString(playerid, "JobName", ClassName, sizeof(ClassName));
}
Reply
#2

The error is not here, show us the line the error is on... XD
Reply
#3

The error is on this line, but it must by function.

format(Query, sizeof(Query), "[INFO] You've changed the class to %s", GetClassName(playerid));
Reply
#4

You're using some function missing other parameter.

Example: You can't use OnPlayerCommandText without cmtext,like OnPlayerCommandText(playerid),the function need cmdtext,and the error in the function,is that,you're trying to use a function with missing parameters.
Reply
#5

I'm an idiot, I saw the stupidity I did. sorry
Reply
#6

You forgot classid parameter , you may add to the function in the format line, the class enum you defined, example:
pawn Код:
gClass[playerid]
Edit: I think I'm late
Reply
#7

Yea, Instead of doing: GetClassName(playerid);
You should've done : GetClassName(playerid, classid);


Remember this next time :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)