In what order Local X = makebutton(NIL... happens?
Posted: Fri Feb 21, 2025 4:23 pm
I have this piece of code that is not working:
I suppose it doesn't work because Local DragBarIntervalID memory address is not reserved until the creation part is done first.
But I am wondering if there would be some way to get this done this way, without needing to use some outside Variable like Dragbar.IntervalID, or dedicated number.
Therefore, what is the order in which memory reservation for variables happen in this case?
Code: Select all
{OnMouseDown = Function()
Local DragBarIntervalID = SetInterval(Nil, Function()
If IsLeftMouse() = False Then ClearInterval(DragBarIntervalID)
But I am wondering if there would be some way to get this done this way, without needing to use some outside Variable like Dragbar.IntervalID, or dedicated number.
Therefore, what is the order in which memory reservation for variables happen in this case?