SA-MP Forums Archive
error 035: 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: error 035: argument type mismatch (/showthread.php?tid=396903)



error 035: argument type mismatch - ajmac22 - 02.12.2012

I always have trouble getting the locations from /save.... how the fuck do I do this right?

Код:
C:\Users\Austin\Desktop\Pawno\gamemodes\testserver.pwn(98) : error 029: invalid expression, assumed zero
C:\Users\Austin\Desktop\Pawno\gamemodes\testserver.pwn(98) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Код:
if (strcmp("/goto island", cmdtext, true, 10) == 0)
    {
    	SetPlayerPos(playerid,(1046.9867,-2667.2463,15.0484,346.7808,0,0,0,0,0,));
        SendClientMessage(playerid, COLOR_RED, "Sent to SARP Island");
        return 1;
    }
	return 0;
}



Re: error 035: argument type mismatch - Konstantinos - 02.12.2012

Change to
pawn Код:
SetPlayerPos(playerid, 1046.9867, -2667.2463, 15.0484);
EDIT:
Quote:
Originally Posted by ajmac22
Посмотреть сообщение
How do you know what to put there after you /save? I always mess this up and get this error
The parameters are:
pawn Код:
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
You only need to copy the 2nd, 3rd and 4th parameter and paste it into the SetPlayerPos function.
pawn Код:
SetPlayerPos(playerid, Float:x, Float:y, Float:z)
Quote:
Originally Posted by Dark Killer
Посмотреть сообщение
extra barcket, extra arguments and extra comma
Just Try this it will work
SetPlayerPos(playerid,(1046.9867,-2667.2463,15.0484)
In /save first 3 are x , y , z others are used for class like weapons 1 , 2 ,3 and others
No, it won't. They are not the first 3, because the 1st parameter is the skin..


Re: error 035: argument type mismatch - ajmac22 - 02.12.2012

Quote:
Originally Posted by Dwane
Посмотреть сообщение
Change to
pawn Код:
SetPlayerPos(playerid, 1046.9867, -2667.2463, 15.0484);
How do you know what to put there after you /save? I always mess this up and get this error


Re: error 035: argument type mismatch - Dark Killer - 02.12.2012

extra barcket, extra arguments and extra comma
Just Try this it will work
SetPlayerPos(playerid,(1046.9867,-2667.2463,15.0484)
In /save first 3 are x , y , z others are used for class like weapons 1 , 2 ,3 and others