#What does an "Assertion failed" mean??

1 messages · Page 1 of 1 (latest)

whole hull
#

I'm making a dialog system for my 2D story game but it keeps coming up with an "Assertion failed" message when ever I try and test my dialog for my game by clicking on any of the buttons I've set up. Does anyone know how I can fix this?? I'm really stumped lol

severe shell
#

It looks like your dialogue code is set up to assume that the speaker and line are separated by :, when in reality you are separating them with =
This is causing var line_info = line.split(":") to fail, which causes line_info to be the wrong size, which causes the assert() call to fail

#

for a more general answer, the "assertion failed" error means that the condition provided to assert() evaluated false.

whole hull
#

Ohh gottcha thank you! I fixed it but now it's coming up with some other errors 😅

#

I replaced all the = to be : to fix it

#

would it be alright if you could walk me through how to fix these sorry? 🥲

severe shell
#

that seems to just be a typo (it says diaglog_line instead of dialog_line)

whole hull
#

Ahh I see now thank you again for your help! I'll go away and fix those :>

#

It's coming up with this now

severe shell
#

that's the same error, it still says diaglog_line