real-ezTheDev / GodotEzDialoguePlugin

MIT License
109 stars 10 forks source link

Error in dialogue_reader.gd: _evaluate_conditiona_expresion() #10

Closed SpamFaux closed 5 months ago

SpamFaux commented 5 months ago

First, let me start in sharing our appreciation for your plug. Very cool and works really well.

This error occurs when we attempt to perform conditional evaluations within a choice to create dynamic dialogue. While it seems as though this error does not impact the flow of the dialogue, we figured it would be worth letting you know.

Example Evaluation: $if roll1 < 35 + Atlmod

Error: image

We had a further error where on occasion the dialogue reader would not / could not parse our state sent to the event. But at this point we believe this may be an issue with our .godot state getting corrupted with git. (Still looking into this.)

real-ezTheDev commented 5 months ago

Oh! Thanks for cutting this issue! I'll take a look as soon as I can this week!

real-ezTheDev commented 5 months ago

@SpamFaux Could you share a little more on the setup for this conditional. for example, values of variable "roll1" and "Atlmod" and rest of the dialogue script in that dialogue node.

I'm trying to replicate the error with: $if roll1 < 35 + Atlmod but my tests are passing.

Also, are you running this with the most recent commit on the main?

*ps: regarding the state parsing... the plugin just assumes it's a Dictionary type and rely on Godot's handling of Dictionary variable so if there is a parsing issue, it does sound like it might be some sort of corruption issue.

SpamFaux commented 5 months ago

I think this may have been more of a combination of an issue with how we were sending data through the state dictionary and actually processing the conditional within the dialogue event. We went through and fixed some items on our end resulting in the error getting cleared up.

I've run through our established dialogues a ton now that we cleaned them up and I'm no longer getting the error. I'm betting we had something misaligned between the state being passed to the dialogue handler and what was actually getting evaluated in the conditional.

Thank you very much for looking into this! Again, your plugin rocks.

real-ezTheDev commented 5 months ago

Great! I love to hear that the problem is now resolved! Thanks again for using the plugin!