gilzoide / godot-lua-pluginscript

Godot PluginScript for the Lua language, currently based on LuaJIT's FFI
https://gilzoide.github.io/godot-lua-pluginscript/topics/README.md.html
MIT License
308 stars 21 forks source link

Update assertion in `property` function #2

Closed JohnDoneth closed 3 years ago

JohnDoneth commented 3 years ago

I believe the assertion in the property function should be using ~= for getter. Currently it is allowing the following calls without an assertion being raised:

property()
property({})

I also added "for property" to the error message since the stacktrace doesn't help you know where the issue is coming from since it gives you a line into the bundled amalgamated source. "for property" is maybe not the best wording but I think it helps.

gilzoide commented 3 years ago

Good eye! (oops =P)

Loading scripts has really bad error handling, I'll add a stack trace to it!