rakugoteam / Rakugo-Dialogue-System

Inspired by Ren'Py, Rakugo is a project aiming to provide a way to make narrative-based games on Godot easily. Simplify your project, if it is a visual novel, point and click, RPG, interactive text game or many other styles and blends of styles.
https://rakugoteam.github.io
MIT License
222 stars 7 forks source link

Rakugo, get_character_variable push same error two times #188

Closed theludovyc closed 1 year ago

theludovyc commented 1 year ago

get_character_variable call get_character that push an error if a character as not found. But first one do it too. So same error are pushed two times.

Jeremi360 commented 1 year ago

Then it should use has_character() before trying to use get_character()

theludovyc commented 1 year ago

It is more simple if we remove second one

image

You should not call has_character before get_character, it is useless. has_character is only for check if you have one get_character is to get it. if it not exist it return null. so it already handle "has_character"

Jeremi360 commented 1 year ago

I see, you are right, I forgot that get_character() already pushes the error and that we return available variables in error if character exist, so just removing second one push error will be easier.