I created a “heat” variable and for some reason it wont work. the strange part is, that my “health” variable works just fine yet I cant find ANY Difference between the two codes. why is one working and the other one dont? and how do I fix it? Thanks
Please take note that the variable Health_text is not the same as the variable health_text and that the variable Health is not the same as the variable health since ChoiceScript is case sensitive.
Oh, and that you don’t need
if you’ve already got
(I think we went through that last thing last time already, so I’ll leave it at that.)
About the case sensetive variable, I never encountered any problem caused by this. As I said, health variable works fine.
As for the temp\create, If I dont have a *create command I get “non existing variable” error; if I dont have *temp command I cant change the text using numbers, I have to type the text itself (something I dont want to happen here - I want it to act like the “Health”)
That one worked without a *temp variable, so these two examples should work without them too.
and
In the case of the ‘health’ variable the order of precedence isn’t an issue because you’ve got two different variables (Health_text and health_text), but with the ‘heat’ variable it is because you’ve got a temporary and a permanent variable going by exactly the same name.
I’ve got working code again. Please compare it with what you’ve got right now. That should teach you more than any explanation from my side ever would.
startup.txt (+code for testing purposes):
*title Test
*create rep_text "Neutral"
*create rep 0
*create name ""
*create gender_text ""
*create money 0
*create health 0
*create health_text "Uninjured"
*create heat 0
*create heat_text "Anonymous"
*label setrep
*choice
#set rep 0
*set rep 0
You changed your reputation.
*page_break
*goto setrep
#set rep 1
*set rep 1
You changed your reputation.
*page_break
*goto setrep
#set rep 2
*set rep 2
You changed your reputation.
*page_break
*goto setrep
#set rep 3
*set rep 3
You changed your reputation.
*page_break
*goto setrep
#set rep 4
*set rep 4
You changed your reputation.
*page_break
*goto setrep
#set rep 5
*set rep 5
You changed your reputation.
*page_break
*goto setrep
#set rep 6
*set rep 6
You changed your reputation.
*page_break
*goto setrep
#set rep 7
*set rep 7
You changed your reputation.
*page_break
*goto setrep
#set rep 8
*set rep 8
You changed your reputation.
*page_break
*goto setrep
#set rep 9
*set rep 9
You changed your reputation.
*page_break
*goto setrep
#set heat 0
*set heat 0
You changed your heat.
*page_break
*goto setrep
#set heat 1
*set heat 1
You changed your heat.
*page_break
*goto setrep
#set heat 2
*set heat 2
You changed your heat.
*page_break
*goto setrep
#set heat 3
*set heat 3
You changed your heat.
*page_break
*goto setrep
#set heat 4
*set heat 4
You changed your heat.
*page_break
*goto setrep
#set heat 5
*set heat 5
You changed your heat.
*page_break
*goto setrep
#set health 0
*set health 0
You changed your health.
*page_break
*goto setrep
#set health 1
*set health 1
You changed your health.
*page_break
*goto setrep
#set health 2
*set health 2
You changed your health.
*page_break
*goto setrep
#set health 3
*set health 3
You changed your health.
*page_break
*goto setrep
#set health 4
*set health 4
You changed your health.
*page_break
*goto setrep
#set health 5
*set health 5
You changed your health.
*page_break
*goto setrep
#set health 6
*set health 6
You changed your health.
*page_break
*goto setrep
#set health 7
*set health 7
You changed your health.
*page_break
*goto setrep
It can confuse testing, though. In quicktest if you have MorningScene in your scene list but the file is called morningscene.txt, it will give you duplicate readings of untested lines for “both” scenes. And of course it’ll screw up strings; *if gender=“female” won’t work if you originally set gender to be “Female”. So it’s good to keep cases standard.