SA-MP Forums Archive
Argument Type Mismatch - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Argument Type Mismatch (/showthread.php?tid=356348)



Argument Type Mismatch - Jstylezzz - 03.07.2012

Hi everyone,

I am getting really sick of this, I am making a Car database system, but i keep getting errors at the login part..
Here is the piece of code that gives the error:
pawn Код:
if(response)
    {
    SetPVarInt(playerid,"UsedLoginCode",inputtext);//here is the argument type mismatch, 3th argument
    LoginCardatabase(playerid);
   
   
    }
The thing that is being typed is a Integer, something like 9475475, so it's not a string..
anyone any idea on how to solve this?

Thanks


Re: Argument Type Mismatch - [MM]RoXoR[FS] - 03.07.2012

pawn Код:
SetPVarString(playerid,"UsedLoginCode",inputtext);
EDIT : NVM didnt saw tat value is of int type.

pawn Код:
SetPVarInt(playerid,"UsedLoginCode", strval(inputtext));



Re: Argument Type Mismatch - iggy1 - 03.07.2012

pawn Код:
SetPVarInt(playerid,"UsedLoginCode", strval(inputtext));
If you want to store it a a number use mine, if you want to store it as a string use RoXoRs code.


Re: Argument Type Mismatch - Jstylezzz - 03.07.2012

Thanks both of you, I will try this