Alrighty, Going about this another way then, this seems to be working now
* Apparently I am a liar, this is in fact junk and doesn't work after all...
I have two local room variables...
doAsteroid = FALSE
localAsteroid[12] = (77 97 79 82 85 80 83 86 81 84 87 93)
and in the main script a CheckArray Procedure
(procedure public (CheckArray needle haystack)
(var i, size, inArray)
= inArray FALSE
= size Memory(memPEEK haystack)
(for (= i 1) (<= i size) (++i)
(if(== haystack[i] needle)
= inArray TRUE // indicate that we found it
)
)
return inArray
)
and then in the rooms init method, a call to the procedure to set the other local variable
= doAsteroid CheckArray(gRoomNumber localAsteroid)
Then anywhere in the room, I just check the local variable rather than remaking the procedure call over and over again.
(if(doAsteroid)
Previously I had went a different route and had placed the procedure call in a doit method, and included the size as part of the procedure parameters... either or both of which may have been causing me problems.