Where Have I Gone Wrong?
#1

I'm rather new to scripting, and when I compile I get errors.
Here's the command I am trying to add.

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/kill"cmdtexttrue 5) == 0)
    {
        
SetPlayerHealth(playerid0.0);
        return 
1;
    }
    return 
0
Here are the Errors I am getting when I try to compile.
PHP код:
C:\Users\Montell\Desktop\montytest.pwn(150) : error 001expected token","but found "-integer value-"
C:\Users\Montell\Desktop\montytest.pwn(150) : warning 215expression has no effect
C
:\Users\Montell\Desktop\montytest.pwn(150) : error 001expected token";"but found ")"
C:\Users\Montell\Desktop\montytest.pwn(150) : error 029invalid expressionassumed zero
C
:\Users\Montell\Desktop\montytest.pwn(150) : fatal error 107too many 
Could someone tell me where I have gone wrong?

NOTE: This is Line 150: if (strcmp("/kill", cmdtext, true 5) == 0)
Reply


Messages In This Thread
Where Have I Gone Wrong? - by Montell - 19.06.2012, 22:34
Re: Where Have I Gone Wrong? - by tiernantheman - 19.06.2012, 23:31
Re: Where Have I Gone Wrong? - by Mimic - 20.06.2012, 01:09
Re: Where Have I Gone Wrong? - by [MM]RoXoR[FS] - 20.06.2012, 03:08
Re: Where Have I Gone Wrong? - by Mimic - 20.06.2012, 11:34
Re: Where Have I Gone Wrong? - by Skaizo - 20.06.2012, 11:41

Forum Jump:


Users browsing this thread: 1 Guest(s)