Broken script

Will my game break from a large number of such script constructions? Or can it cause other issues? Like, maybe it will lag a lot unable to define the code correctness.

1715082793260.png


The reason for these things is that I'm getting more and more frustrated of the redactor and its tiny window that I can't resize. Decided to block the pages into different segments within the page. It could be easier to navigate when dealing with big events. So the script is serving no purpose for the actual game, only for my own eyes and my brain, keeping it from insanity.
I assume you're doing it in order to have a break that's a different colour that comments?
You'd probably want to start each line in the script with //, so that it's not actually executed, and you should be fine. There'd just be a negligible performance impact when evaluating it when running the event.

Though I would generally recommend splitting such large events into multiple pages or multiple events, but if that's the way you prefer to work it shouldn't really cause problems.
Why not simply use comments? Even multiple ones, if you need some kind of larger visual break?

You shouldn't be putting things into Script commands that aren't code (JavaScript) to be executed.
Why not simply use comments? Even multiple ones, if you need some kind of larger visual break?

As I said, it's just for my eyes, the different colors of comments and scripts helps me better differentiate the segments visually. If it was all green, It would be slightly harder to read the title of the segment, I tried and noticed that. I don't really have any vision problems, but if it works better for me and doesn't create problems, I see no reason to do otherwise.

You shouldn't be putting things into Script commands that aren't code (JavaScript) to be executed.
The reason I'm here is to hear that exact problem with putting anything but code in the script command. Why shouldn't I?

You'd probably want to start each line in the script with //, so that it's not actually executed, and you should be fine. There'd just be a negligible performance impact when evaluating it when running the event.
Thank you, I will do it this way.
The reason I'm here is to hear that exact problem with putting anything but code in the script command. Why shouldn't I?
Script code gets executed, and if the computer comes to code it doesn't understand it will throw a syntax error (depending on what you wrote) and go to the error screen, stopping your game.

so the solution is to only write valid javascript code, even if you don't use it.
and the // mentioned above is actually javascript for "what follows is a comment"
The reason I'm here is to hear that exact problem with putting anything but code in the script command. Why shouldn't I?
I didn't mean to come off as snarky, to me it was just kind of common sensical that you don't try to run code that isn't code.

1 - As @Mac15001900 said, it takes time. It may be an imperceptible amount of time, but every time you do it you're slowing down the actual processing of your game.

2 - Since it's not real code, it's generating errors.
1715089081092.png


If you ever needed to troubleshoot your console for anything, or if any of your players had something that generated log files, they'd be full of garbage.
Script code gets executed, and if the computer comes to code it doesn't understand it will throw a syntax error (depending on what you wrote) and go to the error screen, stopping your game.

so the solution is to only write valid javascript code, even if you don't use it.
and the // mentioned above is actually javascript for "what follows is a comment"
I didn't mean to come off as snarky, to me it was just kind of common sensical that you don't try to run code that isn't code.

1 - As @Mac15001900 said, it takes time. It may be an imperceptible amount of time, but every time you do it you're slowing down the actual processing of your game.

2 - Since it's not real code, it's generating errors.
View attachment 304344

If you ever needed to troubleshoot your console for anything, or if any of your players had something that generated log files, they'd be full of garbage.
Now I tried executing it and got an error in console, too. So I decided to do it that way, it works without errors and fits my aesthetic needs.
Code:
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Never thought such a simple thing can cause problems, but decided to ask anyway and it seems like I saved myself a lot of trouble by doing so. Thank you guys.
Just to clarify - that will not generate errors, but it still contributes to processing lag.
Just to clarify - that will not generate errors, but it still contributes to processing lag.
Then I'm going to sink this ship and watch how it slowly and abruptly sink in ten frames per second. For I shall never succumb to all the logic and programming rules, my poetic soul desires freedom, so if I have to pay the price to make my workflow pleasant, I will do so.
you're both overdramatisising things.

yes, it will cause additional processing time - but unless used axcessively modern computers have enogh reserves to handle some extra processing.

However since the RPG-Makers are basically a double-interpreted engine those reserves are not as high as in a compiled game. If you combine that with other resource-hungry methods like parallax mapping, lighting and particle functions or too many parallel processes, then you can experience lag to the point of crawling.

Original thread: https://forums.rpgmakerweb.com/threads/broken-script.168439/