Question about displaying variables in a window

Hi! I am trying to get variables to display their values in a custom window. I can't get it to work, does anyone have any ideas what is a wrong?
 


EDIT: look at line 28. That is the one I need help with.


help variables.png
No, I have no idea what's wrong, because you don't show me what it does. I can guess what it's supposed to look like, though.


Do you ever call refresh on the window so that is actually draws? You can easily find out by putting  


console.log("Hello!")


into the function and then seeing if "Hello!" is ever printed to the console when the window is open.


Also, can I ask why you're attempting to drawn nothing on line 29? I don't get it, what's the point of drawing nothing? That'll just waste a little bit of performance.


EDIT: Also, while this probably isn't why it's not working, why are you drawing all the text at the same point? That probably isn't going to go over well once it actually starts drawing things.
My window is a custom window on the in game menu.


It is drawing all lines except line 28.


I was wondering if you must use another function to draw variables's value.


Like in rpg vx ace you used to write it like " drawtext ($game_variables[8])


Line 29 is blank because I was editing what were supposed to be there (it is irrelevant though as it have nothing to do with the question i am asking)
Have you confirmed that variable 8 actually has something in it?


You're drawing it at exactly the same position as the last line.  What if you change the x or y values so they're not overlapping?


drawText is also an MV function, that takes more arguments.  The difference between the two is that drawTextEx allows you to use escape codes, while drawText doesn't.
I've moved this thread to Javascript/Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.
Have you confirmed that variable 8 actually has something in it?


You're drawing it at exactly the same position as the last line.  What if you change the x or y values so they're not overlapping?


drawText is also an MV function, that takes more arguments.  The difference between the two is that drawTextEx allows you to use escape codes, while drawText doesn't.

Variables only seem to work with the drawText method. 

It is working now though thanks 🙂
Variables only seem to work with the drawText method. 



Yes, because variables use escape codes.  As I said, one method processes escape codes, the other doesn't.
Yes, because variables use escape codes.  As I said, one method processes escape codes, the other doesn't.

Oh I didn't know that. Thank you 🙂

Original thread: https://forums.rpgmakerweb.com/threads/question-about-displaying-variables-in-a-window.72334/