diff --git a/src/runner/runner.rs b/src/runner/runner.rs index 032d539..4b25bd6 100644 --- a/src/runner/runner.rs +++ b/src/runner/runner.rs @@ -42,8 +42,6 @@ fn init(lua:&mlua::Lua)->mlua::Result<()>{ super::number_sequence::set_globals(lua,&globals)?; super::color_sequence::set_globals(lua,&globals)?; - lua.register_userdata_type::(mlua::UserData::register)?; - Ok(()) } diff --git a/src/runner/script_signal.rs b/src/runner/script_signal.rs index 5197065..3dfe8f6 100644 --- a/src/runner/script_signal.rs +++ b/src/runner/script_signal.rs @@ -126,6 +126,7 @@ pub fn set_globals(lua:&mlua::Lua,globals:&mlua::Table)->Result<(),mlua::Error>{ lua.register_userdata_type::(|reg|{ reg.add_field("Wait",wait); + mlua::UserData::register(reg); })?; Ok(())