I was trying to access labels by their names dynamically,so I tried setting a pair of constants that would hold label addresses as runtime (because I assume you can't runtime labels?), but I get the
error.A constant can't be composed by a variable or a function.
Why does this happen?
Is there a way to do this with constants or another non-variable or non-map solution? I can use variables or maps, but that just seems like a bad idea.
I don't get what the problem is; aren't labels available at compile time?
Code: Select all
EnableExplicit
InitSound()
DataSection
testStart:
IncludeBinary "c:/windows/media/ding.wav"
testEnd:
EndDataSection
#testStart=?testStart
#testEnd=?testEnd
Runtime #testStart, #testEnd
CatchSound(0, GetRuntimeInteger("#testStart"), GetRuntimeInteger("#testEnd")-GetRuntimeInteger("#testStart"))
Take care.