Pawno Multi Commands -
sggassasin - 07.06.2009
Hi I have Been Haveing Truble With My Script When I whant To Put multi Commands In It Give Me Errors eg.
if (strcmp("/airport", cmdtext, true, 10) == 0)
{
SetPlayerInterior(playerid,1);
SetPlayerPos(playerid, 1986.7913,-2202.7417,13.5469);
return 1;
}
if (strcmp("/help", cmdtext, true 10) == 0)
{
SendPlayerClientMessage(playerid, COLOR_RED, "Just Type /commands or /Telle");
return 1;
}
Then I get This Error......
C:\Program Files\Rockstar Games\GTA San Andreas\samp sever\gamemodes\SF.pwn(149) : error 001: expected token: ",", but found "-integer value-"
C:\Program Files\Rockstar Games\GTA San Andreas\samp sever\gamemodes\SF.pwn(149) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\GTA San Andreas\samp sever\gamemodes\SF.pwn(149) : error 001: expected token: ";", but found ")"
C:\Program Files\Rockstar Games\GTA San Andreas\samp sever\gamemodes\SF.pwn(149) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\samp sever\gamemodes\SF.pwn(149) : fatal error 107: too many error messages on one line
So If You Could Help That Would Be Nice
Thx For Reading This..
Re: Pawno Multi Commands -
MPKaboose - 07.06.2009
pawn Код:
if (strcmp("/airport", cmdtext, true, 10) == 0)
{
SetPlayerInterior(playerid,1);
SetPlayerPos(playerid, 1986.7913,-2202.7417,13.5469);
return 1;
}
if (strcmp("/help", cmdtext, true 10) == 1)
{
SendPlayerClientMessage(playerid, COLOR_RED,"Just Type /commands or /Telle");
return 1;
}
try that
EDIT: you posted in wrong topic
Re: Pawno Multi Commands -
Abernethy - 07.06.2009
pawn Код:
if (strcmp("/airport", cmdtext, true) == 0)
{
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 1986.7913,-2202.7417,13.5469);
return 1;
}
if (strcmp("/help", cmdtext, true) == 0)
{
SendPlayerClientMessage(playerid, COLOR_RED, "Just Type /commands or /Telle");
return 1;
}
Re: Pawno Multi Commands -
jana4 - 07.06.2009
This is the short version.
Код:
if(!strcmp("/airport", cmdtext, true))
{
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 1986.7913,-2202.7417,13.5469);
return 1;
}
if(!strcmp("/help", cmdtext, true)) return SendPlayerClientMessage(playerid, COLOR_RED, "Just Type /commands or /Telle");
UPDATED!
Re: Pawno Multi Commands -
Weirdosport - 07.06.2009
jana4 that won't work, strcmp has to return false..
Re: Pawno Multi Commands -
sggassasin - 08.06.2009
Thx that help very much