gms_show_tos ( enable )

Posted by PDGAMES
gms_show_tos ( enable ) doesn't work...
has it been removed or i have to do something?

Replies (9)

Last message on 14 Jul 2015

Size43 (Administrator) on 26 Jun 2015, 16:16:10
Seems like this function should have been removed from the documentation.

You can now use gms_show_replace to easily edit the entire window. The download also contains the source for all windows, and the Window Inspector to quickly see windows.

Removing the tos text is as simple as removing this line in login.scn (any text editor, like notepad will be able to edit the file):
<label style[tos]>@txt_tos</label>


Then load the file using
gms_show_replace(wt_login, 'the entire file here')
PDGAMES (Topicstarter) on 30 Jun 2015, 00:44:13
___________________________________________
############################################################################################
ERROR in
action number 1
of Alarm Event for alarm 0
for object controller_object:

string_copy(login.scn, 11, -11): Index is out of bounds
at gml_Script_wle_load (line 14) - str_constants = string_copy(txt, c_pos1, c_pos2 - c_pos1);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_wle_load (line 14)
called from - gml_Script_gms_show_replace (line 6) - global.__xls_window = wle_load(argument1);
called from - gml_Object_controller_object_Alarm_0 (line 1) - {
Size43 (Administrator) on 2 Jul 2015, 19:55:47
Looks like the </constants> closing tag is missing. If it does exist (at the very top of the file) try adding a space between the opening and closing tag. Let me know if that helps :)
PDGAMES (Topicstarter) on 5 Jul 2015, 14:24:14
i still cant get it
i tried:
< constants >
</constants>
also
<constants>
</constants>
also
<constants>
</constants/>
and
<constants>
</ constants />
Size43 (Administrator) on 7 Jul 2015, 14:56:14
Would you be able to post the contents of the file somewhere so I can take a look? (on pastebin.com or something like that)
PDGAMES (Topicstarter) on 7 Jul 2015, 23:51:17
Size43 (Administrator) on 14 Jul 2015, 22:29:36
For reference, the correct way to write the constants tags is this:

<constants>
</constants>


Otherwise you'll probably still see an error :)
Size43 (Administrator) on 14 Jul 2015, 22:28:33
Are you passing the filename or the contents of the file to the function? The function can't actually load files (due to GM:Studio / GM8 differences in file handling), so you have to pass the entire contents of the file either as a string or by writing your own file loading function.
PDGAMES (Topicstarter) on 11 Jul 2015, 23:41:24
___________________________________________
############################################################################################
ERROR in
action number 1
of Alarm Event for alarm 0
for object controller_object:

string_copy(login.scn, 11, -11): Index is out of bounds
at gml_Script_wle_load (line 14) - str_constants = string_copy(txt, c_pos1, c_pos2 - c_pos1);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_wle_load (line 14)
called from - gml_Script_gms_show_replace (line 6) - global.__xls_window = wle_load(argument1);
called from - gml_Object_controller_object_Alarm_0 (line 1) - {