Hmm, getting error when trying to add a command.
#1

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;
}
Reply
#2

Dammit i need fast help!
Reply
#3

pawn Code:
if(strcmp(cmd, "/help", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
           SendClientMessage(playerid,0xFFFF00AA, "Teleports: /stunt1, /stunt2, /pipe1, /home");
           return 1;
}
Reply
#4

Maybe u need { and } 's under sendclientmessage blabllabla ;

gameover's should work.
Reply
#5

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.
Reply
#6

Is it under OnPlayerCommandText callback?
Reply
#7

I got it working. +rep for gameover.
Reply
#8

Quote:
Originally Posted by Sensitive
View Post
I got it working. +rep for gameover.
No Prob
Reply
#9

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!
Reply
#10

Quote:
Originally Posted by Davz*|*Criss
View Post
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)