How to write obtain item in the txt file?

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.

If we’re both thinking the same way then…

*temp keys 0
 #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.
 Guess you're locked in here forever.
Or was there something ele you were looking for @animax84
1 Like

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

i just copied the part with the item and error.

“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

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

but in stats

This is a stats screen!

text name
text gender
percent Leadership
opposed_pair Strength
text Leadership
text Strength

*goto BuildInventory

*label BuildInventory
*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

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.

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.

1 Like

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

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

who hit the Homerun!!!

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