Skip to content
Andrey Vakhterov edited this page Jul 10, 2015 · 3 revisions

Workspace

Workspace is a storage of variables, event listeners and timers. All scripts on a server running within the workspace environment.

When a player runs script, it uses the workspace that is associated with his name. Workspace stores all variables created by player. You can change your workspace by command /workspace set <name>. Example:
/workspace set ws1 - switch to ws1
/> a = 1 - set variable a = 1
/workspace set ws2 - switch to ws2
/> println a - Error! a is not defined
/> a = 2 - set variable a = 2
/> println a - prints 2
/workspace set ws1 - switch back to ws1
/> println a - prints 1
If two players want to use shared variables, they want to switch to the same workspace.

Clone this wiki locally