SA-MP Forums Archive
Whats wrong? /command [on/off] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Whats wrong? /command [on/off] (/showthread.php?tid=68595)



Whats wrong? /command [on/off] - DmXPlay - 11.03.2009

http://pastebin.com/m59136e01

Its work, but with "SERVER: Unknow Command", whats wrong?. Sorry for my bad English


Re: Whats wrong? /command [on/off] - Pyrokid - 11.03.2009

For the love of god, indent.

http://pastebin.com/f499441d8

I can't seem to find anything wrong with it. Make sure OnPlayerCommandText's return is set to 0.


Re: Whats wrong? /command [on/off] - MenaceX^ - 11.03.2009

Quote:
Originally Posted by [Fackin'
Pyro ]
For the love of god, indent.

http://pastebin.com/f499441d8

I can't seem to find anything wrong with it. Make sure OnPlayerCommandText's return is set to 0.
He showed you a part of OnPlayerCommandText, not the whole public.


Re: Whats wrong? /command [on/off] - Pyrokid - 11.03.2009

Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by [Fackin'
Pyro ]
For the love of god, indent.

http://pastebin.com/f499441d8

I can't seem to find anything wrong with it. Make sure OnPlayerCommandText's return is set to 0.
He showed you a part of OnPlayerCommandText, not the whole public.
Yes I know. And I'm telling him to check if OnPlayerCommandText is set to 1 or 0. It's supposed to be 0. I don't know if that might be the problem, but I can't find anything wrong with his command.

Well, I did do one thing. Instead of making on and off two separate if statements, I change them to an else if. Might prevent some future problems.


Re: Whats wrong? /command [on/off] - DmXPlay - 11.03.2009

still this same

http://pastebin.com/m59136e01


Re: Whats wrong? /command [on/off] - Jefff - 11.03.2009

http://pastebin.com/mb592f1f ?


Re: Whats wrong? /command [on/off] - DmXPlay - 11.03.2009

No,


Re: Whats wrong? /command [on/off] - Mikep - 11.03.2009

If you indented it, people would be able to read it, thus being able to help you.

Nobody can read stuff like:

pawn Код:
public crappyindentation() {
if(2+2=4) {
Blah(); } else {
Bleh(); } return 1;}
Nobody can read that with ease, unlike the following:

pawn Код:
public crappyindentation()
{
  if(2+2=4)
  {
    Blah();
  }
  else
  {
    Bleh();
  }
  return 1;
}



Re: Whats wrong? /command [on/off] - [RP]Rav - 11.03.2009

pawn Код:
if(2+2=4)
Quote:

/index.php?topic=92787.0(3) : warning 211: possibly unintended assignment
/index.php?topic=92787.0(3) : error 022: must be lvalue (non-constant)
/index.php?topic=92787.0(3) : warning 215: expression has no effect
/index.php?topic=92787.0(3) : error 001: expected token: ";", but found ")"
/index.php?topic=92787.0(3) : error 029: invalid expression, assumed zero
/index.php?topic=92787.0(3) : fatal error 107: too many error messages on one line




Re: Whats wrong? /command [on/off] - Mikep - 11.03.2009

It was an example..

Heres another example:

if(cows go moo)