Help with Randomtest error message - Can't fairAdd to non-percentile value


#1

This error message is confounding me. I’ve spent an hour trying to figure out what’s wrong.

So I have all my supporting characters with variables showing the relationship with the MC. They all start at 25.

In startup:

*create stunner 25

Then later in the game I have a choice that affects the MC’s relationship with him, resulting in the following code on line 256.

*set stunner %-30

When I run Randomtest, I get this message

line 256: Can’t fairAdd to non-percentile value: 0

Does anyone have any idea what’s wrong? The stunner variable should be exactly the same as alllll the other characters but he’s the only one that gives me this message and it’s preventing me from running a full Randomtest


#2

somewhere you may have set stunner to less than 1. Most likely you have a space between the % and the minus.


#3

@JimD, thanks for the tip. I’ll check that out right now.


#4

Well I found one mistake where I had typed *set stunner -30% in an earlier scene but the tests still give me the same error on line 256. I’m double and triple checking the other *set stunner commands. Again, I appreciate the help. Hopefully there’s one more goof hiding somewhere.


#5

I am not a big fan of percentages but I know it should be

*set stunner %- 30

(no space between % and -)


#6

It’s possible you’ve set stunner to a value in quotes (i.e. a text string) instead of a numerical value somewhere …


#7

@gkkiller, Thanks! that’s what I’m checking for after work today. I’ve been shift f ing everything to do with stunner and I -have- to find the problem because its jamming up randomtest until it’s fixed.


#8

is there a way to make the game auto correct values pass up 100% to 99%?

for example i have a value that is 104 or more, can i make a script so the game auto correct it to 99, so it never pass the limit.


#9

Look up the use of Fairmath - here is the Wiki-link: http://choicescriptdev.wikia.com/wiki/Fairmath#Fairmath


#10

Yup.

(20 chars…)