Non-Existent Variables and Inventory grief


#1

Hello everyone :] It’s been at least a year since I worked on my choice game, so I admit to being a bit rusty. I did search through the forum and read up on similar posts but couldn’t find anything that fixed my problem.

The player will have the option to go fishing. When they reach the lake, they can choose what type of fish to try and catch. Depending on whether they selected fishing as their main skill, they will or won’t catch it. I had already had 4 types of fish in the inventory system, so after successfully catching a fish their inventory would then display the fish name. Now, a character is giving the player a roasted fish, and I need to add another item to the inventory. when I follow the same format as the others, though, I get this non-existent variable error. But it isn’t even a variable. The name is spelled correctly in both startup and the scene, no caps, it’s all the same–it works just fine for all the other fishes, but not this one lol
Here’s the instance in the scene. The inventory item / variable in question is “sill” :

*choice
	#Tell her you have time to fetch some rabbits from Darren. You don't add that you'd briefly considered stealing them for Marjuun's qiqirn, of course.
		
		"Please, if you would?" She nods, taking a pinch of leaves from the basket and adding them to her cutting board. "I need to have another batch made up for her by mid-day, and I've never run out before."
	
		You put a hand to her shoulder. "It's okay, I'll be right back. Oona's gonna be fine."
		
		She nods tensely, forcing a smile. "Of course."
		
		"Do you have enough syrup?" You ask as you head for the door. 
		
		"Oh, plenty. I nearly forgot to add it this time..."
		
		*goto darrens_rabits
	
	# Try to convince her that you're too busy for an extra errand, but you still need her help. By all means, you kind of are. Then, throw in that if she's busy, you can go ask Gran Laulie...that'll get her going.
		"Oh, I-I'm sorry, actually," You wince, and talk a half-step back. "I came to ask you for a favor? I'm in a hurry, as it turns out. No it's okay, I'll go ask if Gran Laulie can help me, I don't want to be in your way."
	
		Annei frowns, her chopping slowed. "Oh." She tries a smile, but you can tell it's forced. "What sort of favor did you need? Laulie can't help with laundry anymore, she's too old. And I'm too busy, as well, I'll add."
		
		"It's no big deal, I just wanted to ask for some extra meat for $!{qiqirn} and I. We haven't had much in the way of hunting," You lie to her, "And he's stopped eating the gruel since it's mostly fish guts and veggies. But Gran Laulie probably has some salted beef, and I won't want to take up your time if you're already busy."
		
		"I-I, well," She scoffs. "By all means, you <i>should</i> go take that salted beef from her, she hasn't the teeth to eat that way anymore." Despite this, she sets the knife down and brushes her hands along the dark blue apron and moves about in the kitchen. "I have some roasted fish from yesterday? Will he eat that?"
		
		You smile. "If it's fresher than the week-old fish guts Pa's been giving him, I'm sure he will."
		
		Annei groans sympathetically, unwrapping a roasted sill from the leather pouch and passing it to you. You take it carefully, making sure not to frown at the way it's glassed-over eye is staring at the wall. "Thank you, Auntie Annei. I owe you one."
		
		She gives you a small smile--I can see she wishes she pressed you into getting those rabbits, but can't help but be charmed by you. "That you do, boy. And I'll remember it."
		
		You bid her farewell, backing out of the house. The sill is wrapped up in a spare cloth and tucked into $!{qiqirn}'s saddlebag before you turn him around and head for Marjuun's cabin.
		
		*set sill true
		*goto marjuuns_cabin

and here’s my startup.txt (as you can see, I greatly favor booleans):

*title Misdirection

*author Heather I. Relken

*scene_list
	startup
	childhood
	roots_one

*create Name ""
*create Qiqirn ""
*create Weapon ""
*create Arrows 0
*create Wrangling 50
*create Hunting 50
*create Fishing 50
*create Fighting 50
*create Intelligence 50
*create Eloquence 50

*create toughness 50
*create agility 50 


*create gender_male false
*create gender_female false

*create primary_trait_wrangling false
*create primary_trait_hunting false
*create primary_trait_fishing false
*create primary_trait_fighting false
*create primary_trait_intelligent false
*create primary_trait_eloquent false

*create secondary_trait_wrangling false
*create secondary_trait_hunting false
*create secondary_trait_fishing false
*create secondary_trait_fighting false
*create secondary_trait_intelligent false
*create secondary_trait_eloquent false

*create worst_trait_wrangling false
*create worst_trait_hunting false
*create worst_trait_fishing false
*create worst_trait_fighting false
*create worst_trait_intelligent false
*create worst_trait_eloquent false

										*comment INVENTORY:
*create berries false
*create coyote false
*create legless_coyote false
*create coyote_scrap false
*create rednose false
*create oopsdeller false
*create deller false 
*create sill false
*create broadfin false

I mean I can just claim that she’s giving him a broadfin or a deller, but I know I’m going to need to add new inventory items in the future. So why do some of them work but this new one wont?

Thanks in advance for any help :smile:


#2

Did you write in the choicescript_stats file something like:

INVENTORY: *if (sill) You carry a sill. *if (sill != true) You don't have anything.

Or, you mean a ${} variable?


#3

No, it just gives off a list. Here’s what the other fish variables look like:

*choice
	#Try to catch a Red-Nose. They're large and hard to reel in, but a little extra meat would be nice.
		*if (primary_trait_fishing = true)
			Hook properly baited, you maneuver around to the other side of the lake where they like to gather and set yourself on the grass there.

			It takes a deal of focus and expertise to lure the Red-Nose to your hook. Twice you had to quickly reel in before a dim-witted Deller tried to get at your bait. $!{qiqirn} rolls in the wet sand not far away before striding into the water and lapping it up. He has plenty of time to idle in the shallows before you reel in your target, a nice two-foot-long fish with a dull red snout. As you pack up the gear, $!{qiqirn} comes by and sniffs at the struggling fish. You pass him a slice of apple from the pouch at your hip to tide his appetite, then set your gear on his back and set off in the direction of Marjuun's cabin.
			
			*set rednose true
			*goto marjuuns_cabin

and then in the Stats screen, it lists their percentages and traits and underneath it says
Inventory: Rednose
and that’s it


#4

But what do you want to do with the fish variable? Like, just having a NPC mention you managed to get it?


#5

Right. She says here’s your fish, kid, and then it goes into your pocket, and i want the player to be able to go to their stat screen and see it in their inventory.

What confuses me is that it works for all the other ones I made, but not this one, and the format all seems to be identical.


#6

My best guess is that you somehow missed a step or something.

If the MC gets the fish:

You catch a sill. *set sill true
Then the stats screen:

*if (sill)
  You have a sill.

And the story:

*if (sill) "Very well, kid! That's a fine catch!"