Help with creating window with text via event scripting on RMVXA.

So I followed a tutorial about how to draw a new window with text on it. This came as incredibly helpful so I tried following the steps. The problem is that I can perfectly create the window, but I cannot write text on it because multiple errors pop up. Every time I try to fix it myself a different error pop ups. I am not a pro in programming, my knowledge is extremely limited, almost null. So I need help with drawing text, urgent, please.

Here is the script I made by following the steps of said tutorial:

@Win = Window_Base.new(10,10,170,60),@text = "Monday, October1Early Morning2",Font.default_name =
["Verdana"],@win.draw_text(5,5,@text)


(This window simulates a daytime clock. That is why the "Early Morning" text is shown. I want it to be a separate line under the "Monday, October" line).

"@Win = Window_Base.new(10,10,170,60)" works with no problem. From @text the script starts to fall down. Also, the tutorial pointed out that it is possible to use text commands, like variables ("\\V[1] for Variable 1"). I also need this to work because I am going to do a separate window with text that is guided by a variable.
This is the tutorial, by the way:
If anyone is willing to help I will be very, very grateful. Thanks in advance to anyone who tries to reply, and thanks for reading.
It makes no sense to leave my lengthy post here. The OP doesn't understand what's happening in the game project. Or the OP isn't taking us seriously at all.
I tried following these steps, but nothing happened. The window does not even appear this time. I thank you for your cooperation, though.
I tried following these steps, but nothing happened. The window does not even appear this time. I thank you for your cooperation, though.
I think the issue is that you're doing this in an event script command and it may only work in the script editor, just like you were making your own script.

The event script command is for running script commands not making scripts.
You need to generate your script and then call a command to call the window in the script command.

Your title suggests you are using the event, can you confirm?
I think the issue is that you're doing this in an event script command and it may only work in the script editor, just like you were making your own script.

The event script command is for running script commands not making scripts.
You need to generate your script and then call a command to call the window in the script command.

Your title suggests you are using the event, can you confirm?
Yeah, I'm using the "script" option on a event, mostly because that's what the tutorial was trying to explain. Could you elaborate, please? And sorry for asking for too much, I'm really dumb when it comes to computer programming.
Could you elaborate, please?
Spoiler: script command
1708978014372.png
Spoiler: Script editor
1708978062598.png
Start with the tutorials in my signature block
here
↓
Spoiler: script command
Spoiler: Script editor
I understood that with the first message. I was referring about calling the command to I can make the window appear. but thank you.
I was referring about calling the command to I can make the window appear. but thank you.
Generally it's a scene that is called. Just like Scene_Menu
In the scene you make your windows.
Now I haven't gone through that tutorial to know if is calling the window directly or using event commands to make the window but my impression is that it's guiding you on using the script editor.
So in that case you can do a call to the scene (I have not seen anything that does a direct call to the window - but that tutorial looks like it referring to just that).
You have the code in the editor and then use the event command to create the window.
@Win = Window_Base.new(X,Y,Width,Length)
(I would not do it this way)

Then you can do other things with @Win ( in the same event command - since once the event script command is done that object in the script command will be deleted (I think)).

I would study the existing scripts in the editor.

You need to read a lot if you want to learn the programming of it.
So as I said start with the tutorials and look for ruby programming tutorials, then RGSS programming tutorials. There are a few still out there.

But in short to what you were asking.
You would normally call a scene or you would do an interpreter command (which you need to have programmed)
It makes no sense to leave my lengthy post here. The OP doesn't understand what's happening in the game project. Or the OP isn't taking us seriously at all.
No need to be like that though. I pretty much know how to use this program almost perfectly because I've been using it since 2014. but I never got into programming because the very objective of this engine is to be able to do things without being a programmer. I can do a lot of things but when it comes to scripting my hands are tied.
Your post did help me understand some things about Ruby, though. so I thank you for that.
use code tags to enclose code

Code:
like this
@win = Window_Base.new()

make sure the names are well written
Win and win are different objects.

From @text the script starts to fall down
where? how?
things work one way, but can fail in many different ways.
draw_text() requires either 5 or 2 parameters: either the individual coordinates of the rectangle of text to be drawn, AND the string of text, *OR* the object rectangle to be drawn, AND the string.
programming doesn't rely on assumptions.
where? how?
things work one way, but can fail in many different ways.
draw_text() requires either 5 or 2 parameters: either the individual coordinates of the rectangle of text to be drawn, AND the string of text, *OR* the object rectangle to be drawn, AND the string.
programming doesn't rely on assumptions.
"How?"
The string of text after the window_base command makes the game throw an error when executed. if I delete said string, the command runs perfectly but only creating an empty window which is not what I need.
Uh, thanks for pointing out the parameters though. I already mentioned it, I'm not into programming, and not into Ruby at all. so I can't exactly know on what programming relies.
the game throw an error
what error?
the key to fixing errors is knowing the error!
"How?"
The string of text after the window_base command makes the game throw an error when executed. if I delete said string, the command runs perfectly but only creating an empty window which is not what I need.
Uh, thanks for pointing out the parameters though. I already mentioned it, I'm not into programming, and not into Ruby at all. so I can't exactly know on what programming relies.
There are a few errors that can be thrown by programming languages. We can't help you unless you tell us what the error actually is. 😛

Original thread: https://forums.rpgmakerweb.com/threads/help-with-creating-window-with-text-via-event-scripting-on-rmvxa.166175/