Choices in stats

I have a problem with choices in stats.
I have a choice in stats to several labels. no problem here.
my problem is I have equipment, and a choice under a label called inventory, where it asks what you want to equip.
But when I click on for instance, equip dagger, nothing happens. if I replace one of the first choices in stats with an equip choice, it works perfectly, but that is not where the choice should be.
Here is my choice for equipment.
currently just testing with one item.


Which item to you wish to equip?
*choice
	*if (dagger=1) #Equip Dagger
		*set offhand "Dagger"
		*goto inventory
	#Do nothing.
		*goto inventory
	#I'd rather view my main stats again
		*goto main_stats

as stated, if move it, so it is the first choice in stats, it works perfectly, and anywhere else in the game, it also works perfectly.

I hope any of you have some good advice in this regard.

ps.
another quick question.
I’d like to be able to do this, but it doesn’t work.


*if (offhand=dagger)

For being able to define circumstances for when the dagger is equipped.

Due to the way the stats screen works, you can’t have choices on the stats screen. I mean you can’t have choices that effect stats in the stats screen. So no setting equipment on the stats screen.

Have you tried

*if offhand=“dagger”

doesn’t *if always require () ?
alright, hmmm.
what if I where to have the equip choice in my inventory stats.
and then gosub to the main stats screen for the effects?
so for instance:

in inventory screen


	*if (dagger=1) #Equip Dagger
                *gosub weapon_effects_dagger
		*goto inventory

and this in the main stat screen


*label weapon_effect_dagger
*set offhand "Dagger"
*return

and I’ll certainly give the:


*if (offhand=dagger)

  • a test :slight_smile:

It doesn’t always require a set of brackets. It just requires them if you have something afterwards. You do, however, always need to use the quotation marks for string variables.

So *if offhand=“dagger”
not *if offhand=dagger

You can’t set things on the stat screen. It won’t work the moment you leave the stats screen.

Alright. thank you for the clarification =D

a quick question.
why does this not work?


		*if (strength+power>=11)

it gives me this:
line 50: Invalid expression at char 17, expected closing parenthesis, was: INEQUALITY [>=]

Have you tried *if (strength+power)>=11

@dinosw
About *if (strength+power>=11) Everything has to be paired. Essentially, the computer can’t tell if you mean:
*if (strength+(power>=11))
or
*if ((strength+power)>=11)
So it throws up an error.

thank you both =) and @FairyGodfeather --> *if (strength+power)>=11 worked perfectly =)