D
DIF Studios
Guest
Hello, so I'm doing a suuuuuuper simple text box.Basically I have an invisible controller for the text system in the room, and any time I need it to show up, I just change the currenttext variable and it draws whatever text I tell it to. The only way I can really make it work is through scripts. Only problem is, I'm trying to use a string as one of the arguments and every time I do I get this error:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Mouse Event for Right Button
for object testobj:
Unable to find any instance for object index '3'
at gml_Script_textscript (line 1) - text_controller.show=argument0;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_textscript (line 1)
called from - gml_Object_testobj_RightButtonDown_1 (line 1) - textscript(1,"did it work?");
________________________________________________________________________________________
So here's the script (Again, it's a very, extremely simple textbox.)
And here's how I execute the script (Used in various objects)
textscript("Test Text");
I've tested the text box on it's own, just to make sure that the script is the problem and not something else in the text box's controller.
Basically what I'm getting from this, is you can't use strings in arguments, or I'm doing something else dumb.
Any and all input is greatly appreciated
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Mouse Event for Right Button
for object testobj:
Unable to find any instance for object index '3'
at gml_Script_textscript (line 1) - text_controller.show=argument0;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_textscript (line 1)
called from - gml_Object_testobj_RightButtonDown_1 (line 1) - textscript(1,"did it work?");
________________________________________________________________________________________
So here's the script (Again, it's a very, extremely simple textbox.)
Code:
textbox_obj.currenttext=argument0;
textscript("Test Text");
I've tested the text box on it's own, just to make sure that the script is the problem and not something else in the text box's controller.
Basically what I'm getting from this, is you can't use strings in arguments, or I'm doing something else dumb.
Any and all input is greatly appreciated