![]() |
Show Changes |
![]() |
|
![]() |
Recent Changes |
![]() |
Subscriptions |
![]() |
Lost and Found |
![]() |
Find References |
![]() |
Rename |
![]() |
Administration Page |
![]() |
Topic Locks |
| Search |
History
| 6/7/2007 1:17:30 PM |
| -84.49.122.175 |
| 5/30/2007 12:28:16 PM |
| -125.72.28.38 |
| 5/28/2007 6:20:25 AM |
| -69.136.148.27 |
| 10/14/2005 7:10:05 PM |
| info@brightland.com-66.27.77.187 |
| 10/14/2005 7:09:31 PM |
| info@brightland.com-66.27.77.187 |
![]() |
List all versions |
Check out the formatting tips on the right for help formatting and making links.
Use the template below:
Response to a forum question regarding isolating multiple scripts:
// If I understand your question correctly, you want to isolate registered functions for multiple scripts (for sandboxing?). If so, you could create additional VM's: SquirrelVM::Init(); HSQUIRRELVM vm1 = SquirrelVM::GetVMPtr(); // Get original _VM from SquirrelVM::Init(). SquirrelVM::Init(); HSQUIRRELVM vm2 = SquirrelVM::GetVMPtr(); // Get new _VM. Then before calling script functions (including binding functions for each VM): SquirrelVM::SetVMPtr(vm1); //... register and call scripts setup under vm1 SquirrelVM::SetVMPtr(vm2); //... register and call scripts setup under vm2 //At shutdown: SquirrelVM::SetVMPtr(vm2); SquirrelVM::Shutdown(); SquirrelVM::SetVMPtr(vm1); SquirrelVM::Shutdown();
Creating multiple root tables and switching them is another solution.