Making cmds - need help
#1

Okay, so its me again, lol. I need help again with my friend's and my cmds. I got errors on this line. and yes, this line is Line 27 wich is on the errors below.

pawn Код:
if( strcmp(cmd, "/help", true) == 0) {
These are the errors:

C:\Users\Daniel\Desktop\Gamemodeserver.pwn(27) : error 029: invalid expression, assumed zero
C:\Users\Daniel\Desktop\Gamemodeserver.pwn(27) : warning 215: expression has no effect
C:\Users\Daniel\Desktop\Gamemodeserver.pwn(27) : warning 215: expression has no effect
C:\Users\Daniel\Desktop\Gamemodeserver.pwn(27) : error 001: expected token: ";", but found ")"
C:\Users\Daniel\Desktop\Gamemodeserver.pwn(27) : error 029: invalid expression, assumed zero
C:\Users\Daniel\Desktop\Gamemodeserver.pwn(27) : fatal error 107: too many error messages on one line

I need help ASAP
Reply
#2

Bump, nah just kiddin, check this. This is the whole cmd script:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if( strcmp(cmd, "/help", true,) == 0) {
     {
        SendClientMessage(playerid, 0xFFFFFFFF, "Type /Teles to get a message with teles around the map. Type /Rules to!");
        return 1;
     }
     return 0;
}

{
Reply
#3

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "Type /Teles to get a message with teles around the map. Type /Rules to!");        
        return 1;
    }
    return 0;
}
You've two extra braclets and one extra comma.
Reply
#4

if( strcmp(cmd, "/help", true,) == 0)
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if( strcmp(cmd, "/help", true) == 0)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "Type /Teles to get a message with teles around the map. Type /Rules to!");
        return 1;
    }
    return 0;
}
Edit: [XST]O_x was faster
Reply
#5

Now i got 23 errors. some errors are on our teles, wich have been fully working be4 this one :L
Reply
#6

Quote:
Originally Posted by Twix[KDZ]
Посмотреть сообщение
Now i got 23 errors. some errors are on our teles, wich have been fully working be4 this one :L
Show us your code then
Reply
#7

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "Type /Teles to get a message with teles around the map. Type /Rules to!");
        return 1;
    }
    return 0;
}
Reply
#8

Don't only paste the code on your pawno.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "Type /Teles to get a message with teles around the map. Type /Rules to!");
        return 1;
    }
    // Rest Of Commands HERE !
    return 0;
}
Reply
#9

Quote:
Originally Posted by Twix[KDZ]
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "Type /Teles to get a message with teles around the map. Type /Rules to!");
        return 1;
    }
    return 0;
}
That's your whole code?
That can't produce 23 errors... It's a fine code, there must be other commands or something you're not showing us.
Reply
#10

okay now i did this one :
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if( strcmp(cmd, "/help", cmdtext, true, 7 ) == 0 )
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "Type /Teles to get a message with teles around the map. Type /Rules to!");
        return 1;
    }
    // Rest Of Commands HERE !
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: