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

Код:
if (strcmp("/lsstunt", cmdtext, true, 10) == 0)
    {
	    SetPlayerPos(playerid, "266,-1539.3887,-1076.7513,769.5139,274.6397");
		SendClientMessage (playerid, "You Have Been Teleported To Los Santos Crazy Stunt");
		return 1;
	}
I Am Getting This Error I Don't Know Why,I Am New To SA-MP Scripting.. Anyone Can Fix It?
Reply
#2

You have the coordinates inside quotes and it takes it as string.

pawn Код:
SetPlayerPos(playerid, -1539.3887, -1076.7513, 769.5139);
SetPlayerFacingAngle(playerid, 274.6397);
Reply
#3

pawn Код:
if (strcmp("/lsstunt", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 266,-1539.3887,-1076.7513,769.5139,274.6397);
        SendClientMessage (playerid, "You Have Been Teleported To Los Santos Crazy Stunt");
        return 1;
    }
This forum requires that you wait 120 seconds between posts. Please try again in 26 seconds.
Reply
#4

Код:
if (strcmp("/lsstunt", cmdtext, true, 10) == 0)   {
            SetPlayerPos(playerid, -1539.3887, -1076.7513, 769.5139);
			SetPlayerFacingAngle(playerid, 274.6397);
			SendClientMessage (playerid, "You Have Been Teleported To Los Santos Crazy Stunt");
			return 1;
	}
I Did This In The Pawno And The Error Was
Код:
 error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#5

Danyal used 6 arguments and the function has 4. The arguments are also wrong in SendClientMessage:
pawn Код:
if (!strcmp("/lsstunt", cmdtext, true, 8))
{
    SetPlayerPos(playerid, -1539.3887, -1076.7513, 769.5139);
    SetPlayerFacingAngle(playerid, 274.6397);
    SendClientMessage(playerid, -1, "You Have Been Teleported To Los Santos Crazy Stunt");
    return 1;
}
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Danyal used 6 arguments and the function has 4. The arguments are also wrong in SendClientMessage:
pawn Код:
if (!strcmp("/lsstunt", cmdtext, true, 8))
{
    SetPlayerPos(playerid, -1539.3887, -1076.7513, 769.5139);
    SetPlayerFacingAngle(playerid, 274.6397);
    SendClientMessage(playerid, -1, "You Have Been Teleported To Los Santos Crazy Stunt");
    return 1;
}
FK Me i just removed quotes sorry for mistake.

Thanks Konstantinos for correction.
Reply
#7

No Problem It Worked +repped u 2..
Reply
#8

and can u tell me that I can make a filterscript with that code?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)