GMS 2 draw_set_colour

How do I put a variable into draw_set_colour in GMS2?
Code:
global.second_colour = "c_yellow";
draw_set_colour(global.second_colour);
draw_rectangle(340, 600, 940, 650, true);
When I do this it tells me that the draw_set_colour is wrong :(
Error is "draw_set_colour argument 1 incorrect type (string) expecting a Number (YYGI32)"

James
 

FrostyCat

Member
Do you know the difference between pi and "pi"? If you do, you should know what the problem with your first line is and what to do about it.
Code:
global.second_colour = c_yellow;
 
Top