argument type mismatch ??
#1

error 035: argument type mismatch (argument 2) I get this all time

All lines,.

PHP код:
COMMAND:help(playeridparams[])
{
    if(
PlayerLoggedIn[playerid] == true)
    {
        
SCM(playeridCOL_WHITE"__________________HELP__________________");
        
SCM(playeridCOL_GREEN"CMDS");
        
SCM(playeridCOL_GREEN"CMDS");
        
SCM(playeridCOL_WHITE"_______________________________________");
          return 
0;

Reply
#2

COL_WHITE is by convention probably defined as an embedded color code:
PHP код:
{FFFFFF// white 
Embedded color codes can only be used in the middle of strings, hence them being embedded:
PHP код:
""COL_WHITE"This is white\n"COL_GREEN"While this is green." 
Colors as function arguments must be in their hexadecimal form:
PHP код:
0xFFFFFFFF //white 
In your case, you should define the color with its hexadecimal value:
PHP код:
#define COLOR_WHITE 0xFFFFFFFF 
Reply
#3

You have a missing bracket ( } ) above return 0;
Also, it should be return 1; or else it will show "SERVER: Unknown command."
Reply
#4

Okey now i get this fixey !! But now : error 030: compound statement not closed at the end of file (started at line 671)
Reply
#5

Код:
COMMAND:help(playerid, params[]) 
{ 
    if(PlayerLoggedIn[playerid] == true) 
    { 
        SCM(playerid, 0xFFFFFFFF, "__________________HELP__________________"); 
        SCM(playerid, 0x33AA33AA, "CMDS"); 
        SCM(playerid, 0x33AA33AA, "CMDS"); 
        SCM(playerid, 0xFFFFFFFF, "_______________________________________"); 
        return 0;
    } 
}
Reply
#6

@K0P ur command wont work because ur returning 0
Try this b0b
Код:
COMMAND:help(playerid, params[]) 
{ 
    if(PlayerLoggedIn[playerid] == true) 
    { 
        SCM(playerid, 0xFFFFFFFF, "__________________HELP__________________"); 
        SCM(playerid, 0x33AA33AA, "CMDS"); 
        SCM(playerid, 0x33AA33AA, "CMDS"); 
        SCM(playerid, 0xFFFFFFFF, "_______________________________________"); 
        return 1;
    } 
}
Reply
#7

If you return something inside an if statement, it will ask give you a warning for not returning anything outside.
You should return 1; before adding the last bracket.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)