Argument Type Mismatch..
#1

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?
Reply
#2

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

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

/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?
Reply
#5

What i was going to say ^^
Reply
#6

Yes, I defined COLOR_RED.
Reply
#7

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~
Reply
#8

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

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
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)