K
krugen
Guest
May I ask how could I solve this problem? The global variable contains a number I would like to use as a scale. Apart from creating a variable to store the value. I know you could do string(global variable) for draw_text. How about this case?
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object obj_data_upper_player:
draw_sprite_ext argument 5 incorrect type (string) expecting a Number (YYGF)
at gml_Object_obj_data_upper_player_Draw_0 (line 6) - draw_sprite_ext(spr_bar, 0, x + 86, y + 22, string(global.player_hp_scale), 1, 0, c_white, 1);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_data_upper_player_Draw_0 (line 6)
update: Copying the global variables to the local variables do not work as well.
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object obj_data_upper_player:
draw_sprite_ext argument 5 incorrect type (string) expecting a Number (YYGF)
at gml_Object_obj_data_upper_player_Draw_0 (line 6) - draw_sprite_ext(spr_bar, 0, x + 86, y + 22, string(global.player_hp_scale), 1, 0, c_white, 1);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_data_upper_player_Draw_0 (line 6)
update: Copying the global variables to the local variables do not work as well.