learn-gdscript
learn-gdscript copied to clipboard
Lesson 25.2: Crashes when I use assertions (assert())
Describe the bug I just added two assertions in my code for exhaustiveness and editor printed this error:
Oh no! The script has an error, but the Script Verifier did not catch it
To Reproduce
Run this code:
func add_item(item_name, amount):
assert(!item_name.empty())
assert(amount > 0)
inventory[item_name] += amount
Expected behavior I expected no error raised
For more informations, have a look at this log file.