(i figured this out (see bottom). It seems writing out this post helped me wrap my head around it. Thanks anyway)
I am having trouble writing a very simple equation.
Ive simplified the code i am actually using, to make it easier to understand my problem.
(i’m sorry, i forget how to make something CODE in the posts here)
After saying hello to Redd Osbourne for the first time:
let C be the confidenceAtt of the player;
let P be the perceptionAtt of the player;
let W be the wisdomAtt of the player;
(all of my indentation is correct in my code, i just cant remember how to do that here)
The problem/error im getting is in the equation. This is obviously not the correct way to write it but for the life of me, i can not find how to write it. Ive read the numbers and equations documentation up and down and this simple thing eludes me.
From what i can tell, inform wants me to dictate the equation first, then use “let X be given by (name of equation)”. Is that how i have to do it? or is there just a proper syntax to write it the way i want to.
In other words, what is the proper way to write “if C plus P pus W is less than 9”.
I could be completely off base here, i dont know. The examples used for the numbers and equations section of the documentation make my brain melt. I believe that i have a great understanding of Inform, but that section just makes me want to slam my head against a wall, lol.
Thanks for any help!
In case you were curious, i did this…
Equation - Convo Equation
T = C+P+W
where T is a number, C is the confidenceAtt of the player, P is the perceptionAtt of the player, W is the wisdomAtt of the player.
Then just put “if T is less than 9” where i had my equation.