Open/closing worlds by name (Lua)

Posted by Biran on Mon 21 Aug 2023 03:38 PM — 2 posts, 7,584 views.

#0
My issue is getting to actually find the world...its named jj6
but when I run this command it says Cannot find
c:\program files\(86x)\...\jj6

The file originally said jj6 when you went to the file tab on the top left but changed to this after using this command

openedOK = world.Open ("jj6.mcl") -- true or false



This close Command below works flawlessly

world.DoAfterSpecial (3, "world.DoCommand 'close'", 12)

BACKSTORY:
So basically iv got a droid that I only want to be logged on during a certain task...to drop money off for safekeeping. upon his return to a quiet room, he runs the close command to close out the work altogether then open again when he is called by the other player after his money reaches x amount.


I see two ways to go about this..one closing the world and one opening using the above command

or other is using normal Quit leaving the world open and somehow reconnecting when called upon.
Australia Forum Administrator #1
I was able to open a world from another one by doing this:


Open ("worlds/worldName.mcl")