mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
I can spell good I swear.
This commit is contained in:
parent
c01fdfb372
commit
ecf9a3404b
|
@ -43,10 +43,10 @@ running lua code
|
|||
lua.script_file("path/to/luascript.lua");
|
||||
|
||||
// load file without execute
|
||||
sol::function script1 = state.load_script_file("path/to/luascript.lua");
|
||||
sol::load_result script1 = state.load_file("path/to/luascript.lua");
|
||||
script1(); //execute
|
||||
// load string without execute
|
||||
sol::function script2 = state.load_script("a = 'test'");
|
||||
sol::load_result script2 = state.load("a = 'test'");
|
||||
script2(); //execute
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user