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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Argument Type Mismatch.. (/showthread.php?tid=69854)



Argument Type Mismatch.. - Hiyoko - 21.03.2009

Quote:

C:\Program Files\Rockstar Games\server\gamemodes\chilliadmadness.pwn(85) : error 035: argument type mismatch (argument 2)
C:\Program Files\Rockstar Games\server\gamemodes\chilliadmadness.pwn(86) : error 035: argument type mismatch (argument 2)
C:\Program Files\Rockstar Games\server\gamemodes\chilliadmadness.pwn(87) : error 035: argument type mismatch (argument 2)
C:\Program Files\Rockstar Games\server\gamemodes\chilliadmadness.pwn(8 : error 035: argument type mismatch (argument 2)
C:\Program Files\Rockstar Games\server\gamemodes\chilliadmadness.pwn(89) : error 035: argument type mismatch (argument 2)
C:\Program Files\Rockstar Games\server\gamemodes\chilliadmadness.pwn(95) : error 035: argument type mismatch (argument 2)

Code:
Код:
	if (strcmp("/help", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, COLOR_RED, "Type /teleports for teleports.");
	SendClientMessage(playerid, COLOR_RED, "Type /stunt for stunting locations.");
	SendClientMessage(playerid, COLOR_RED, "Type /dm for deathmatch locations.");
	SendClientMessage(playerid, COLOR_RED, "Type /kill to suicide.");
	SendClientMessage(playerid, COLOR_RED, "Type /chilliad to go back to the spawn.");
	return 1;
	}
	
	if (strcmp("/teleports", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, COLOR_RED, "/airportls /airportsf /airportlv /airportdesert");
	return 1;
	}
	return 0;
	}
Anyone sees the problem?


Re: Argument Type Mismatch.. - Dreftas - 21.03.2009

Works fine for me O_O maybe you dont have #include <a_samp> or something...


Re: Argument Type Mismatch.. - Hiyoko - 21.03.2009

#include <a_samp> is on the script. But it won't work.


Re: Argument Type Mismatch.. - LarzI - 21.03.2009

/help and /teleports isn't 10 characters long...

pawn Код:
if (strcmp("/help", cmdtext, true) == 0)
    {
        SendClientMessage(playerid, COLOR_RED, "Type /teleports for teleports.");
        SendClientMessage(playerid, COLOR_RED, "Type /stunt for stunting locations.");
        SendClientMessage(playerid, COLOR_RED, "Type /dm for deathmatch locations.");
        SendClientMessage(playerid, COLOR_RED, "Type /kill to suicide.");
        SendClientMessage(playerid, COLOR_RED, "Type /chilliad to go back to the spawn.");
        return 1;
    }
   
    if (strcmp("/teleports", cmdtext, true) == 0)
    {
        SendClientMessage(playerid, COLOR_RED, "/airportls /airportsf /airportlv /airportdesert");
        return 1;
    }
    return 0;
}
You sure you defined COLOR_RED?


Re: Argument Type Mismatch.. - mascii - 21.03.2009

What i was going to say ^^


Re: Argument Type Mismatch.. - Hiyoko - 21.03.2009

Yes, I defined COLOR_RED.


Re: Argument Type Mismatch.. - Cueball - 21.03.2009

Quote:
Originally Posted by lrZ^
/help and /teleports isn't 10 characters long...

You sure you defined COLOR_RED?
Technically, "/teleports" is 10 characters long

And yes, COLOR_RED must be defined or else there would be a different warning/error.

You will need to show us where you defined COLOR_RED so we can tell you what you have done wrong.

~Cueball~



Re: Argument Type Mismatch.. - MenaceX^ - 21.03.2009

Why aren't you doing it as
pawn Код:
if(!strcmp(cmd,"/command",true))



Re: Argument Type Mismatch.. - ICECOLDKILLAK8 - 21.03.2009

Quote:
Originally Posted by MenaceX^
Why aren't you doing it as
pawn Код:
if(!strcmp(cmd,"/command",true))
Because people like to script in different ways


Re: Argument Type Mismatch.. - LarzI - 21.03.2009

Quote:
Originally Posted by Cuecumber
Quote:
Originally Posted by lrZ^
/help and /teleports isn't 10 characters long...

You sure you defined COLOR_RED?
Technically, "/teleports" is 10 characters long
~Cueball~
Ok, then I have a question
In OnPlayerCmdtext do you count with or without the slash?
Cuz with it's 11, without it's 10
/ 1
t 2
e 3
l 4
e 5
p 6
o 7
r 8
t 9
s 10
\0 11