Can anyone help with an error on DashingDon?

One of the players testing my WIP has found this error on DashingDon. It refers to a fairmath error, though the line in question only has a correct (asaik) reference, used many times before.

I cannot recreate the error. Any advice?

Please find the error below.

Could you provide the code for that line?

1 Like

Hi Dvalor,

It was;
*set presence %+10

I have changed in to (added a space);

*set presence %+ 10

I will download the updated scenes and see if it nips it in the bud. How does it look to you?

The vernacular of the second one looks right.

2 Likes

You can’t percent add if the value is above 100 or would go above 100, it breaks.

1 Like

Both ways have worked so far… until now.

I think, without the space, the code is read to take a percentile value over 100, with the space it doesn’t.

Although I’m just guessing.

I think it might fix my problem though, so many thanks.

Hi Abhorash,

Using the choicescript fair math system, it shouldn’t go above 100 regardless of the coded value.

I think the problem was how I formulated it. Instead of %+ 10, I didn’t place the space and had %+10. This made all the difference in breaking the 100 limit, as far as I am aware.

1 Like

Yeah but if you mix fairmath and non-fairmath and it ends up above 100 or below 0 it can break or as is more likely since you probably aren’t doing that if someone playing your wip uses devtools in the browser to change a stats value (so that it is above 100 or below 0) it can break. But also yeah %+ 10 is how it’s supposed to be written so that might’ve been causing the issue in this case.

1 Like

Hi again,
The error continues. It is in exactly the same place as before, though the line is different because I added an event previously.

The code used is quoted beneath the image. The line in question is the ‘presence’ line.

Would it help to add a conditional like:
*if (presence >=100)
*set presence 99

Any advice, please?

Captura de tela 2023-07-15 114839

*set Human_Opinion %+ 5
*set presence %+ 10
*set metemperor true
*goto_scene orckingthrone emperor

1 Like

No worries. I have solved it. @Abhorash was right.

Back in the previous scene I had *set presence +10 and not *set presence %+ 10

Will bang my head against a wall for a while now.

2 Likes

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.