Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Call Script Syntax Error? [Resolved]

Code:
$game_variables[15] = $game_map.passable?($game_variables[2], $game_variables[3], 2)

I try to call this script and it gives me a syntax error. Also, it looks more like this in the box for some dumb reason:

Code:
$game_variables[15] = 

$game_map.passable?($game_variables

[2], $game_variables[3], 2)
lolwut.png

What am I doing wrong?

RPG Maker XP. This is supposed to be for an airship landing thing. (Events + scripts.)
 
Thanks but that doesn't address the main issue here.

How do I get the interpreter to not read each newline as a separate script? Or alternatively, is there a user-made patch out there somewhere that gives the script... command a horizontal scroll bar?
 
There is a patch called "Limes Edition". It improves the "Show Message" and "Script..." functions.
You can download it in this german forum: http://www.rpg-studio.de/forum/board374 ... tion-0-20/
(just scroll down a bit to the end of the first post)

A second option is to get the variables value's first:
Ruby:
n = $game_variables[2]

m = $game_variables[3]

i = $game_map.passable?(n, m, 2)

$game_variables[15] = i

Oh, and by the way:
Why don't you use $game_switches instead of $game_variables when you only want to store a boolean?
 
The code I was using was tentative. Night_Runner on RRR showed me a workaround by tricking RGSS into thinking there's more code on the next line.
Code:
$game_switches[13] =

$game_map.passable?(

$game_variables[2],

$game_variables[3], 2)
 
Alternatively you could go into the Interpreter script and add a new method, and call this method in the script call. It's a bit complicated but less messy than the above.

I.e.

class Interpreter
def voodoo_passable(x, y, z)
p = $game_map.passable?($game_variables 
 
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top