Making cmds - need help -
Twix[KDZ] - 27.01.2012
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
Re: Making cmds - need help -
Twix[KDZ] - 27.01.2012
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;
}
{
Re: Making cmds - need help -
[XST]O_x - 27.01.2012
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.
Re: Making cmds - need help -
Konstantinos - 27.01.2012
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
Re: Making cmds - need help -
Twix[KDZ] - 27.01.2012
Now i got 23 errors. some errors are on our teles, wich have been fully working be4 this one :L
Re: Making cmds - need help -
[XST]O_x - 27.01.2012
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
Re: Making cmds - need help -
Twix[KDZ] - 27.01.2012
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;
}
Re: Making cmds - need help -
Konstantinos - 27.01.2012
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;
}
Re: Making cmds - need help -
[XST]O_x - 27.01.2012
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.
Re: Making cmds - need help -
Twix[KDZ] - 27.01.2012
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;
}