Code: Select all
I might want to do soemthing like this:
for local n = 1 to 5
MakeButton(n, #SIMPLEBUTTON, 1, 1, 200, 200, {OnMouseUp = Function () DebugPrint(""..n) EndFunction})
next
n=7
WaitEvent
What I would now like to happen is that when I click Button number 1, it would debugprint: 1.
When I would click on Button number 2, it would debugprint: 2.
However, in reality, regardless which button I press, it would result in Debugprintt: 7.
But is there a way for me to actually get that Debugprints "n" to become a fixed number instead of a variable?