Some Chat Problems

Posted by CG_2004
For some reason, the chat is enabled but i can't write on it....
I don't know if it is a bug or i've wrotten something wrong at the codes.
But well, here is the code:

gms_chat_toggle(true);
gms_chat_bind_view(view_current,100,70);
gms_chat_set_font(global.main_font);
gms_chat_colors(c_white,c_green,0.50);
gms_chat_local("Press T to Chat", c_white);
gms_chat_keys(ord("T"),vk_enter,ord("Y"));

Replies (4)

Last message on 21 Apr 2020

Portal4376 on 12 Apr 2020, 12:50:23
i think it didn't work :\
Portal4376 on 12 Apr 2020, 12:53:00
the error text says:
___________________________________________
ERROR in
action number 3
of Create Event
for object object_player_online:

Error in code at line 3:
gms_chat_set_font(global.main_font);
^
at position 27: Unknown variable main_font
Portal4376 on 12 Apr 2020, 12:53:29
or did i do wrong?
Size43 (Administrator) on 21 Apr 2020, 10:25:57
Where did you get that code from? If you do not have a global variable main_font it will not work.