[Help!] Error 035: argument type mismatch (argument 2) -
zDevon - 18.01.2012
I'm getting the above error on lines 90 and 100. I cannot find what is wrong for anything. Anyone know what's up? I am very new to Pawn.
pawn Код:
YCMD:starttrucking(playerid, params[], help)
{
#pragma unused params
#pragma unused help
new string[50];
SendClientMessage(playerid, COLOR_GREEN, "CB Radio: Well, get che' a truck from ye' ol' HQ!");
format(string, sizeof(string), "Head to the Truckers HQ in Dillimore.");
GameTextForPlayer(playerid, string, 3000, 4);
SetPlayerCheckpoint(playerid, 807.3625,-610.1833,16.3359, 3.0);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREEN, "CB Radio: Eh, you've made it. Choose a truck.");
return 1;
}
Re: [Help!] Error 035: argument type mismatch (argument 2) -
[ABK]Antonio - 18.01.2012
thought i'd tell ya...string = unnecessary....however i don't know which line is 90 and which is 100.
Re: [Help!] Error 035: argument type mismatch (argument 2) -
Tannz0rz - 18.01.2012
Quote:
Originally Posted by [ABK]Antonio
thought i'd tell ya...string = unnecessary....however i don't know which line is 90 and which is 100.
|
Pretty much this. Though the code looks fine and not being provided with the proper lines, I've come to notice that the SendClientMessage calls are ten lines apart. Tell me, what exactly is COLOR_GREEN defined as?
Re: [Help!] Error 035: argument type mismatch (argument 2) -
zDevon - 18.01.2012
Oh, sorry! Forgot to add that.
Line 90 is
pawn Код:
SendClientMessage(playerid, COLOR_GREEN, "CB Radio: Well, get che' a truck from ye' ol' HQ!");
Line 100 is
pawn Код:
SendClientMessage(playerid, COLOR_GREEN, "CB Radio: Eh, you've made it. Choose a truck.");
Color green;
pawn Код:
#define COLOR_GREEN "{00FF22}"
Re: [Help!] Error 035: argument type mismatch (argument 2) -
Tannz0rz - 18.01.2012
Quote:
Originally Posted by zDevon
Oh, sorry! Forgot to add that.
Line 90 is
pawn Код:
SendClientMessage(playerid, COLOR_GREEN, "CB Radio: Well, get che' a truck from ye' ol' HQ!");
Line 100 is
pawn Код:
SendClientMessage(playerid, COLOR_GREEN, "CB Radio: Eh, you've made it. Choose a truck.");
Color green;
pawn Код:
#define COLOR_GREEN "{00FF22}"
|
That's your problem
pawn Код:
#define COLOR_GREEN "{00FF22}"
It should be
pawn Код:
#define COLOR_GREEN 0x00FF22FF
SendClientMessage expects the second argument to not be an array as the quotations operators specify.
Re: [Help!] Error 035: argument type mismatch (argument 2) -
Eric - 18.01.2012
pawn Код:
YCMD:starttrucking(playerid, params[], help)
{
#pragma unused params
#pragma unused help
new string[128];
format(string, sizeof(string), "CB Radio: Well, get che' a truck from ye' ol' HQ!");
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "Head to the Truckers HQ in Dillimore.");
GameTextForPlayer(playerid, string, 3000, 4);
SetPlayerCheckpoint(playerid, 807.3625,-610.1833,16.3359, 3.0);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
DisablePlayerCheckpoint(playerid);
format(string, sizeof(string), "CB Radio: Eh, you've made it. Choose a truck.");
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
Try that.
Edit: Try what the above said first.
Re: [Help!] Error 035: argument type mismatch (argument 2) -
zDevon - 18.01.2012
Quote:
Originally Posted by Tannz0rz
That's your problem
pawn Код:
#define COLOR_GREEN "{00FF22}"
It should be
pawn Код:
#define COLOR_GREEN 0x00FF22FF
|
That was a simple fix, thanks a lot!
Quote:
Originally Posted by Eric
pawn Код:
YCMD:starttrucking(playerid, params[], help) { #pragma unused params #pragma unused help new string[128]; format(string, sizeof(string), "CB Radio: Well, get che' a truck from ye' ol' HQ!"); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string), "Head to the Truckers HQ in Dillimore."); GameTextForPlayer(playerid, string, 3000, 4); SetPlayerCheckpoint(playerid, 807.3625,-610.1833,16.3359, 3.0); return 1; }
public OnPlayerEnterCheckpoint(playerid) { DisablePlayerCheckpoint(playerid); format(string, sizeof(string), "CB Radio: Eh, you've made it. Choose a truck."); SendClientMessage(playerid, COLOR_GREEN, string); return 1; }
Try that.
Edit: Try what the above said first.
|