RUNNING WITH RIFLES
http://www.runningwithrifles.com/phpBB3/

Basic Command Handler
http://www.runningwithrifles.com/phpBB3/viewtopic.php?f=7&t=2114
Page 1 of 1

Author:  SparkSounds [ Sun Feb 22, 2015 8:07 pm ]
Post subject:  Basic Command Handler

I was messing around and tried to input this command into the game: http://pastebin.com/raw.php?i=TwYTub2p
It obviously didn't work,because why would I be here? Not only did it work,it disables all commands in there,such
/_g36 /_jeep /_suitcase ect.


Why I wanted to spawn a Tank? I didn't like waiting 10min for them to come in,plus,modding is fun.
Edit: Only a Admin might know about what happened,since there kinda who made the game itself, >. >
or at least they know all about it.

Author:  SparkSounds [ Sun Feb 22, 2015 9:26 pm ]
Post subject:  Re: Basic Command Handler

Bump: This is a basic question,and not long ago a admin was on...
Anyone could answer this though... Stumps me too but is it that crazy?

Author:  pasik [ Mon Feb 23, 2015 9:23 am ]
Post subject:  Re: Basic Command Handler

You can see the script errors by looking at %appdata%\Running with rifles\metagame.log, it should tell you where the problem is.

Author:  SparkSounds [ Tue Feb 24, 2015 1:06 am ]
Post subject:  Re: Basic Command Handler

pasik wrote:
You can see the script errors by looking at %appdata%\Running with rifles\metagame.log, it should tell you where the problem is.

I think you mean this:

20:10:19 fifo i=php://stdin, o=php://stdout
20:10:19 comms, fifo i=php://stdin, o=php://stdout
20:10:19 FATAL PHP ERROR 4: syntax error, unexpected 'else' (T_ELSE), expecting function (T_FUNCTION)
20:10:19 file C:\Games\Running With Rifles v0.99.6\media\packages\vanilla\scripts\trackers\basic_command_handler.php, line 143


Could you take a look at my code? Here is a full file,on pastebin.com.
I copied one line,the /_suitcase (else if) command and edited its set instance and settings,which is kinda the same thing.

Author:  pasik [ Tue Feb 24, 2015 6:26 am ]
Post subject:  Re: Basic Command Handler

Code:
      }
   }
    else  if(check_command($message, "_tank")) {
         //RWR SPAWN MOD (SPAWN TANK
         $this->spawn_instance_near_player($sender_id, "tank1.vehicle", "vehicle");
      }

Like the error description says, you broke the function :) Those two } in sequence already cause the function to end, leaving what you added outside the function breaking the syntax.

Author:  SparkSounds [ Tue Feb 24, 2015 11:10 pm ]
Post subject:  Re: Basic Command Handler

pasik wrote:
Code:
      }
   }
    else  if(check_command($message, "_tank")) {
         //RWR SPAWN MOD (SPAWN TANK
         $this->spawn_instance_near_player($sender_id, "tank1.vehicle", "vehicle");
      }

Like the error description says, you broke the function :) Those two } in sequence already cause the function to end, leaving what you added outside the function breaking the syntax.


Wow! Thanks so much! I never understood why it wasn't working! But now I know better!
By the way,is there a function to place the instance (such as a airstrike) at the mouse?
And what model would be a airstrike anyway?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/