error 035: argument type mismatch (argument 1)
#1

Hey I was just making a simple function until i reached this:
Quote:

C:\Users\Username\Desktop\CGCNR\gamemodes\cgcnr.pw n(14194) : error 035: argument type mismatch (argument 1)
C:\Users\Username\Desktop\CGCNR\gamemodes\cgcnr.pw n(14196) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

My code is:
pawn Код:
public IncreasePlayerXP(playerid,Value)
{
    new pXP = dUserINT(playerid).("XP"); //Line 14194
    pXP +=Value;
    dUserSetINT(playerid).("XP", pXP); //Line 14196
    return 1;
}
Got any ideas why i got those errors?
Reply
#2

I believe the first parameter is not integer (playerid), but string instead from what I saw to a thread.
Reply
#3

What do you mean by that ?
Reply
#4

PHP код:
public IncreasePlayerXP(playerid,Value)
{
    new 
pXP dUserINT(playerid).(XP); //Line 14194
    
pXP +=Value;
    
dUserSetINT(playerid).(XPpXP); //Line 14196
    
return 1;

try this
Reply
#5

Nope that didn't work either, I still reach the same error
Reply
#6

You're missing PlayerName(playerid).
Reply
#7

Solved by using "PlayerName(playerid)".
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)