I am having trouble with some of my code, and after scratching my head for a few days I thought it would be better to ask… what is wrong with the code below? Any ideas? It seems to give me an error on the expression
*if (money > (cost_torpedo*1)) #One salvo of torpedoes
Invalid expression, couldn’t extract another token
Full code below…
*choice
#Dock your ship at the space station's shipyard (for repairs or buying ammunition, etc)
You dock your ship at the space station's shipyard, and within a few minutes one local official appears on the main screen, asking what they can do for you.
*label shipyard_choices
*choice
#Tell him that you are not interested in anything and proceed somewhere else
*goto finished_station
*if (ship_ammo < ship_maxammo) #Tell him that you are interested in buying ammunition for your proton torpedoes
The official nods, and inquires how much ammunition would you like to buy
[Note that you currently have ${ship_ammo} and the maximum you can hold is ${ship_maxammo}, any purchases over this amount will be lost]
*if (money > (cost_torpedo*1)) #One salvo of torpedoes
*set ship_ammo +1
*set money -(cost_torpedo*1)
*goto finish_buying_ammo