SA-MP Forums Archive
Error on SetPlayerPos - 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 on SetPlayerPos (/showthread.php?tid=456935)



Error on SetPlayerPos - NinjahZ - 08.08.2013

pawn Код:
sw.pwn(672) : warning 202: number of arguments does not match definition
SetPlayerPos(playerid,2156.3208,-1708.1588,15.0859,292.6273);
pawn Код:
sw.pwn(681) : warning 202: number of arguments does not match definition
SetPlayerPos(playerid,2528.0120,-1650.0964,14.4368,116.5171);
This is what it is from
pawn Код:
case DIALOG_TEAMS:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(listitem == 0)
                {
                    SetPlayerPos(playerid,2156.3208,-1708.1588,15.0859,292.6273);
                    ResetPlayerWeapons(playerid);
                    SetPlayerSkin(playerid, 176);
                    GivePlayerWeapon(playerid, 34,80);
                    SetPlayerColor(playerid, COLOR_BLUE);
                    SpawnPlayer(playerid);
                }
                if(listitem == 1)
                {
                    SetPlayerPos(playerid,2528.0120,-1650.0964,14.4368,116.5171);
                    ResetPlayerWeapons(playerid);
                    SetPlayerSkin(playerid, 19);
                    GivePlayerWeapon(playerid, 34,80);
                    SetPlayerColor(playerid, COLOR_RED);
                    SpawnPlayer(playerid);
                }
            }
        }



Re: Error on SetPlayerPos - park4bmx - 08.08.2013

you have too much parameters !
SetPlayerPos only contains playerid,X,Y,Z


Re: Error on SetPlayerPos - arjanforgames - 08.08.2013

But if you see: "Number of arguments does not match definition."
Why not look it up on the samp wiki?


Re: Error on SetPlayerPos - morocco - 08.08.2013

change
pawn Код:
SetPlayerPos(playerid,2156.3208,-1708.1588,15.0859,292.6273);
To

pawn Код:
SetPlayerPos(playerid,2156.3208,-1708.1588,15.0859);
pawn Код:
SetPlayerPos(playerid, x,y,z);



Re: Error on SetPlayerPos - NinjahZ - 08.08.2013

Hey guys I appreciate you're help but I decided to do some digging and found out that this code is really what I need
SetSpawnInfo(playerid,0,176,2156.3208,-1708.1588,15.0859,89.9102,34,80,0,0,0,0);


Re: Error on SetPlayerPos - TraceurEST - 08.08.2013

If you want to do this with SetPlayerPos, you gotta do it like this:
SetPlayerPos(playerid, x,y,z);
SetPlayerFacingAngle(playerid, angle);