From bf0c4f74c374927edff332f8d00f2aac88c8c322 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sat, 5 Oct 2024 22:31:48 -0700 Subject: [PATCH] error instead of print, expanded message --- src/runner/instance.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runner/instance.rs b/src/runner/instance.rs index 2da9a52..3059157 100644 --- a/src/runner/instance.rs +++ b/src/runner/instance.rs @@ -248,7 +248,7 @@ impl mlua::UserData for Instance{ Some(&rbx_types::Variant::CFrame(cf))=>return Into::::into(cf).into_lua(lua), Some(&rbx_types::Variant::Vector3(v))=>return Into::::into(v).into_lua(lua), None=>(), - other=>println!("instance.properties.get(i)={other:?}"), + other=>return Err(mlua::Error::runtime(format!("Instance.__index Unsupported property type instance={} index={index_str} value={other:?}",instance.name))), } //find a function with a matching name if let Some(function)=class_functions_mut(lua,|cf|{