get return value

This commit is contained in:
Quaternions 2024-02-25 23:45:36 -08:00
parent 8bb3b8ab65
commit 032cc52921

View File

@ -199,8 +199,11 @@ fn bake(script_path:std::path::PathBuf)->Result<(),anyhow::Error>{
globals.set("shared",shared_table)?;
}
match lua.load(script).exec(){
Ok(())=>(),
let call_result:mlua::Result<mlua::Table>=lua.load(script).call(());
match call_result{
Ok(ret)=>{
println!("gundata={:?}",ret);
},
Err(e)=>println!("Lua Error: {e}"),
}