Sorry, having a bad day!
I missed the line
Global Sign="A" as string
but, this syntax is wrong anyhow!
It should be:
Global A as string
Sign = "A"
To prove my point, try this:
global sign="a" as string
do
text 0,0,sign
loop
You don't get anything, whereas
global sign as string
sign="a"
do
text 0,0,sign
loop
You get an "a"
And even then, your function is looking for Sign$, a different variable altogether!
e.g.
global sign as string
sign="a"
do
text 0,0,sign$
loop
fails to print an "a"!
I've put in a clause to check for obj=0, and it works, no crashes, and I have nothing on-screen!
Global Sign as string
sign="A"
Do
DisplayObjectInfo()
loop
function DisplayObjectInfo()
If mouseclick()=1
obj=pick object (mousex(),mousey(),1,2)
if obj=0 then exitfunction
center text object screen x(obj)-40,object screen y(obj),Sign
endif
endfunction
Try it in a new blank project.
"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library
First you Dream, then you ... - Neil Gaiman, 2001