hippyman
Member
I tried to make a simple one liner singleton macro
But for some reason this doesn't work. Do ternary operations not work for macros or does this have something to do with the instance functions?
I wanted to make sure that this is expected before I reported a bug.
EDIT: I found the REAL problem.
I need to assign the final value to a variable like this
This code here works.
Code:
#macro IMGUI instance_exists(imgui) ? instance_find(imgui,0) : instance_create_layer(0,0,"Instances",imgui)
I wanted to make sure that this is expected before I reported a bug.
EDIT: I found the REAL problem.
I need to assign the final value to a variable like this
Code:
#macro IMGUI __imgui = instance_exists(imgui) ? instance_find(imgui,0) : instance_create_layer(0,0,"Instances",imgui)
Last edited: