My dialog box gets permanently re-sized when running this event.

I don't know what's happening here, but I'd like to fix it. The event is giving me a bed at the inn for 10 gold for a night, it works fine. Problem is that after running it the dialog box is the way it is in the screenshot below. I'm sure the cause is this line:

@>Control Variables: [0022:HaveMoney] = Gold
But I don't know why, or how to fix it. This happens both on answering yes or no to buying the bed by the way. 

Event: 

weirdproblem.png 

Dialog re-size: 

weirdproblem2.png 

If anyone can see what I'm doing wrong or know of an alternative way to do this, I'd appreciate it.
What I suggest you do is to use the Quick Create function to see how Ace normally does the check for gold when you go to an Inn and then copy that.  You don't need to set up a separate variable for it.

As for why it suddenly resizes your text box - it may be that this variable is being used by one of your custom scripts, and you haven't noticed it.  When you use it, the script takes over.  

Have a look at any custom script which affects the message box and see what variables it's using, if any.

If a script is using a variable, NAME THE VARIABLE so that you don't use it for something else.

EDIT

That's also true for control switches as well.  Always check your scripts to see what switches they use, if any, and NAME THEM immediately.  If you have 2 scripts which use the same switch, change the switch in one of them to something else.
Many of the variables between 1 and 60 are used by scripts. Check what scripts you have installed and make sure *all* of the variables the scripts use are reserved for the scripts and the scripts alone.

Incidentally, you don't happen to have Yanfly's message system script do you? If so, variables 21 and 22 are reserved by that script, and control the size of the message boxes, and you either need to change the variables in that script, or not use variables 21 and 22 in  your game.
Yes, I am using that script, so that explains it. Thanks for the tip, I'll make sure to leave those alone from now on. Anyway, looking at the quick inn shortcut I found out I didn't even need a money variable, I could just add \$ to the end of the dialog line before it. Thanks for helping me fix it.

Original thread: https://forums.rpgmakerweb.com/threads/my-dialog-box-gets-permanently-re-sized-when-running-this-event.42762/