Lingo fixes, better error messages, some other things#74
Merged
igorlira merged 11 commits intoigorlira:mainfrom Mar 22, 2026
Merged
Lingo fixes, better error messages, some other things#74igorlira merged 11 commits intoigorlira:mainfrom
igorlira merged 11 commits intoigorlira:mainfrom
Conversation
igorlira
reviewed
Mar 14, 2026
vm-rust/src/player/script.rs
Outdated
Comment on lines
+230
to
+239
| Err(ScriptError::new(format!( | ||
| "Cannot get property {} found on script instance {}. Valid properties are: {}", | ||
| warn!("Cannot get property {} found on script instance {}. Valid properties are: {}", | ||
| prop_name, | ||
| format_concrete_datum( | ||
| &Datum::ScriptInstanceRef(script_instance_ref.clone()), | ||
| player | ||
| ), | ||
| valid_props.iter().join(", ") | ||
| ))) | ||
| ); | ||
| // documentation says getaProp should return VOID for nonexistent properties | ||
| Ok(DatumRef::Void) |
Owner
There was a problem hiding this comment.
We already have a function that returns Void if the property doesn't exist: script_get_prop_opt, and there are cases in which trying to access a nonexistent property throws an error, such as when calling script.unknown_property directly or script.getProp('unknown_property'). In other words, getaProp should call script_get_prop_opt (it is currently calling script_get_prop)
Contributor
Author
|
@igorlira is there anything left to do on this PR? |
igorlira
approved these changes
Mar 22, 2026
Owner
igorlira
left a comment
There was a problem hiding this comment.
Looks good, thanks for sending this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See list of commits.