Hmm, getting error when trying to add a command. -
Sensitive - 24.08.2011
Hello.
When i try to add a command in my Gamemode i will get 2 errors.
Code:
C:\Documents and Settings\Microsoft.KODUARVU-6442CC\Desktop\SG\gamemodes\SSM.pwn(1963) : error 010: invalid function or declaration
C:\Documents and Settings\Microsoft.KODUARVU-6442CC\Desktop\SG\gamemodes\SSM.pwn(1966) : error 010: invalid function or declaration
Here are the lines:
Quote:
Line 1963 - if (strcmp("/help", cmdtext, true, 10) == 0)
Line 1966 - return 1;
|
And this is the full cmd
Code:
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xFFFF00AA, "Teleports: /stunt1, /stunt2, /pipe1, /home");
return 1;
}
Re: Hmm, getting error when trying to add a command. -
Sensitive - 24.08.2011
Dammit i need fast help!
Re: Hmm, getting error when trying to add a command. -
=WoR=G4M3Ov3r - 24.08.2011
pawn Code:
if(strcmp(cmd, "/help", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid,0xFFFF00AA, "Teleports: /stunt1, /stunt2, /pipe1, /home");
return 1;
}
Respuesta: Hmm, getting error when trying to add a command. -
uprp - 24.08.2011
Maybe u need { and } 's under sendclientmessage blabllabla ;
gameover's should work.
Re: Hmm, getting error when trying to add a command. -
Sensitive - 24.08.2011
Well, i removed everything else and i added teleports as filterscript. Now what should i do to make /help say
Code:
Teleports: /stunt1, /stunt2, /pipe1, /home
I have no shitty idea :S.
Re: Hmm, getting error when trying to add a command. -
Toreno - 24.08.2011
Is it under OnPlayerCommandText callback?
Re: Hmm, getting error when trying to add a command. -
Sensitive - 24.08.2011
I got it working. +rep for gameover.
Re: Hmm, getting error when trying to add a command. -
=WoR=G4M3Ov3r - 24.08.2011
Quote:
Originally Posted by Sensitive
I got it working. +rep for gameover.
|
No Prob
Re: Hmm, getting error when trying to add a command. -
Davz*|*Criss - 25.08.2011
Gamerover's code is fully ununderstandable for me!
For what do u use isplayerconnected?
You want to pm someone if that player is connected?
I dont think dat would compiled fine.
Learn something!
Re: Hmm, getting error when trying to add a command. -
=WoR=G4M3Ov3r - 25.08.2011
Quote:
Originally Posted by Davz*|*Criss
Gamerover's code is fully ununderstandable for me!
For what do u use isplayerconnected?
You want to pm someone if that player is connected?
I dont think dat would compiled fine.
Learn something!
|
Most strcmp codes need IsPlayerConnected, You seen you only know how to act when it comes to ZCMD.