Referencing a world with its number

Posted by Poromenos on Sat 05 Jul 2003 10:08 PM — 3 posts, 8,914 views.

Greece #0
(Taking the easy way out) Can I reference a world using its world number, or do I have to enumerate all of them and keep the one I want?
Australia Forum Administrator #1
If you do a GetWorldList you should get an array of worlds. Therefore world 5 would be the 5th in the array (not sure if that is subscript 4 or 5 - I would play with that).

Thus, this should work, assuming - and this is a big assumption - that you have 5 worlds ...

dim myworld
dim x
x = GetWorldList

set myworld = x (4) ' get 5th world

To check the actual number of worlds, use 'ubound' on the array (x).
Greece #2
Ah right, thanks a lot... Was wondering whether that would work...