How to write obtain item in the txt file?


#1

I am trying to put in my story that i obtained the item but i looked through the forums and i still can’t find the way.
Please help.


#2

If we’re both thinking the same way then…

*temp keys 0
*choice
 #Pick up the keys.
  *set keys +1
  *goto next
 #Ignore the keys.
  *goto next

*label next
*if keys > 0
 You have keys!
*if keys = 0
 You don't have keys.
 

There’s always simple true and false to confirm weather you have it.

*temp keys false
*if (keys)
 You have keys.
*else 
 Guess you're locked in here forever.
_____
Or was there something ele you were looking for @animax84

#3

Hi, thanks for the reply but i still received an error.

i just copied the part with the item and error.

*choice
#“Pistol”
“You are in luck, I happened to have the last remaining Grym in storage.”

WLX315 - The Grym.....The power of a small cannon in the size of a pistol.......
*set Grym +1
*finish

Error is
startup line 103: Non-existent variable ‘grym’

but in stats

This is a stats screen!

*stat_chart
text name
text gender
percent Leadership
opposed_pair Strength
Weakness
text Leadership
text Strength

*goto BuildInventory

*label BuildInventory
*line_break
*temp inventory “”
*temp comma false
*if empty
*set inventory &“You carry nothing.”
*goto DisplayInv
*if “Grym”
*if comma
*set inventory &", "
*set inventory &“Grym”
*set comma true

My stats page also has error.
I am now very confused


#4

Why don’t you start with my guide. How to make variables is covered in the basic walkthrough. I’m planning on an update today, bit it should include more than everything you need (the problem you’re having is that you need to *create the variable before you try and use it). Also, on the forums clicking this: </> button will format your code to keep the indents if you have it highlighted.


#5

It looks to me as if you haven’t declared Grym i.e " *create Grym 0 " or " *temp Grym 0 " for a temporary variable. That’s why it’s saying non-existent variable. It could also be that if you did declare it, you did so in lowercase but are using it in upper, I’m not really sure if CS is case sensitive, but I always try to keep my cases consistent, just to be safe.


#6

Arcania
Your help made me realise the *set key stuff so thank you…

Reaperoa,
Thanks for your help, especially with the guide. It helped me alot. but it was…

Left4Bed
who hit the Homerun!!!

I forgot to *create grym
Hahahaha, Thanks for all your help.