Problem with script calls [Solved]

KadoDragon

Veteran
Veteran
Joined
Sep 10, 2013
Messages
155
Reaction score
9
First Language
English
Primarily Uses
=================================================================================================================================================================

SOLVED!!!: I found a little program that lets me resize windows in... windows. So I could resize the script call window and not deal with the line break. I'm going to leave this up, unless a moderator wants to take it down, so that people can see my solved issue. The program can be found here and instructions on how to use it are in the zip folder that gets downloaded.

=================================================================================================================================================================

Hi. I'm using the script call equivalents of event commands to be able to do what I'm doing. In particular I'm using the show pictures one 

screen.pictures[index].show(file_name, position, x, y, x zoom, y zoom, opacity, blend type)I'm trying to use a game variable as the index as I am generating 16 x 16 tiles on the screen to cover it on a 640 x 480 resolution which would be 1200 tiles. So I am doing a loop with game variable #4 being a tile count that adds one every time it loops.

screen.pictures[$game_variables[4]].show("Water", 0, 0, 0, 100, 100, 255, 0)As far as I know, that should work. But the script call box is so small that it line breaks after .show so it looks like this.

screen.pictures[$game_variables[4]].show("Water", 0, 0, 0, 100, 100, 255, 0)Here is a screenshot of what it looks like in the editor.



And because of that, I get this error when the event runs.



And I know the line break is an issue because when I replace $game_variables[4] with say 1 with the line break still there so it looks like this.

screen.pictures[1].show("Water", 0, 0, 0, 100, 100, 255, 0)I get the exact same error. So because the window is so tiny, it causes a line break and I get an error. Any help would be appreciated.

NOTE: I know the event is incomplete and it will only show the water tile on the one spot. That will need more game variables which means more line breaks. I'm just trying to get past this problem I'm having before continuing on.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
It seems you're using an older version of the engine. If you redownload/reinstall, your script window will be much wider and you won't have this issue.


In addition, if you DO need to wrap the commands, it's RARELY a good idea to let it wrap by default - it almost ALWAYS puts the line break in the wrong spot. Instead, put your line break after a character that makes it obvious that there's more to come ... all of these (and more) indicate something is still to come:


+ / - * ( [


In your example it's getting to .show and thinking that's the end of the command. It doesn't KNOW that there are arguments to come and that the next line is actually meant to be tacked on to the end. Making sure your line ends with one of the characters above would solve the issue (so putting the ( on the first line, then starting the next line with "Water" would solve your problem).
 

KadoDragon

Veteran
Veteran
Joined
Sep 10, 2013
Messages
155
Reaction score
9
First Language
English
Primarily Uses
It seems you're using an older version of the engine. If you redownload/reinstall, your script window will be much wider and you won't have this issue.

In addition, if you DO need to wrap the commands, it's RARELY a good idea to let it wrap by default - it almost ALWAYS puts the line break in the wrong spot. Instead, put your line break after a character that makes it obvious that there's more to come ... all of these (and more) indicate something is still to come:

+ / - * ( [

In your example it's getting to .show and thinking that's the end of the command. It doesn't KNOW that there are arguments to come and that the next line is actually meant to be tacked on to the end. Making sure your line ends with one of the characters above would solve the issue (so putting the ( on the first line, then starting the next line with "Water" would solve your problem).
Oh! Well... Would you look at that. It's so much bigger. I actually had no idea it was updated. Thank you very much for enlightening me. I'm still going to be using the resizer program though. It's very nifty.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top