Error : "argument type mismatch (argument 2"
#1

public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid, COLOR_RED, "~w~ Welcome to skiilboyyz server",3000,4);
return 1;
}

I got the error 035: argument type mismatch (argument 2)
Reply
#2

i dont get it, you did COLOR_RED and ~w~.

Delete the ~w~
Reply
#3

pawn Код:
public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"~w~ Welcome to skiilboyyz server",3000,4);
return 1;
}
Reply
#4

I got the same error again


GameTextForPlayer(playerid, COLOR_RED, "Welcome to skiilboyyz server",3000,4);
Reply
#5

Thanks Now it works
Reply
#6

Quote:
Originally Posted by NiclasStrand
Посмотреть сообщение
I got the same error again
GameTextForPlayer(playerid, COLOR_RED, "Welcome to skiilboyyz server",3000,4);
Because there isn't any parameter to set a color...
pawn Код:
GameTextForPlayer(playerid, const string[], time, style);
^You see there anything where you can set a color??

CrossOv3r already showed the correct way.
Reply
#7

Try this code

pawn Код:
public OnPlayerConnect(playerid)
{
//Parameters: GameTextForPlayer(playerid, const string[], time, style);
GameTextForPlayer(playerid, "~w~ Welcome to skiilboyyz server",3000,4);
return 1;
}
Reply
#8

Make sure you had defined COLOR_RED so the script is informed of it being defined(so theres no errors)

For example:

#define COLOR_RED 0xAA3333AA
Reply
#9

Mitchy your wrong. but as GameText doesn't use any color define or something.

Gametext uses that color stuff below.
pawn Код:
~n~ New line
~r~ Red
~g~ Green
~b~ Blue
~w~ White
~y~ Yellow
~p~ Purple
~l~ Black
For more information about it read this
https://sampwiki.blast.hk/wiki/GameTextStyle
https://sampwiki.blast.hk/wiki/GameTextForPlayer
Reply
#10

My bad (Still a little new to GameText)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)