PDA

View Full Version : rror 035: argument type mismatch (argument 3)


IGeorge
05/05/2014, 06:36 PM
It gives me error error 035: argument type mismatch (argument 3). . Why?

else if(IDArme[playerid] == 14)
{
GivePlayerWeapon(playerid, 14, inputtext); // On donne des fleurs
}

KillerStrike23
05/05/2014, 06:46 PM
dude show the full code or edit GivePlayerWeapon(playerid, weaponid, ammo); whats wrong with ya people check samp wiki

Konstantinos
05/05/2014, 06:50 PM
The 3rd argument of the function GivePlayerWeapon is ammo and it's integer. inputtext is string; hence you get the warning. If inputtext holds the ammo, then use strval function to convert a string to an integer.

IGeorge
05/05/2014, 07:00 PM
No offense but can not do. . Could you give an example. .?

Konstantinos
05/05/2014, 07:01 PM
Only if what I said above is true will work:

GivePlayerWeapon(playerid, 14, strval(inputtext));

IGeorge
05/05/2014, 07:32 PM
Thank you !