Coding error I can't figure out

After several minutes, you arrive at a clump of bushes about twenty yards from the nearest guard. Whispering to the others, you say,
*fake_choice
	#"I am going to whistle and lure him over here."
		You put your lips together and let out a quiet whistle. The guard perks up and begins walking towards you, a confused look on his face.
		*choice
			#Kill him.
				The guard slowly walks towards you, spear outstretched. Holding your breath, you wait for him to get just a little closer...

				You watch as the guard peers at your hiding spot, trying to notice anything out of the ordinary. Holding your breath, you move slightly as the guard pokes the bush with his spear. Suddenly lunging out, you grab the spear and pull it towards yourself, bringing the guard with it. Eltariel quickly brings his fist down onto the guard's face, knocking him into silence. Reaching for Last Resort, you slit the man's throat.

				Obscuring the body, you and your party creep forwards into the town.
			#Knock him out.
				The guard slowly walks towards you, spear outstretched. Holding your breath, you wait for him to get just a little closer...

				You watch as the guard peers at your hiding spot, trying to notice anything out of the ordinary. Holding your breath, you move slightly as the guard pokes the bush with his spear. Suddenly lunging out, you grab the spear and pull it towards yourself, bringing the guard with it. Eltariel quickly brings his fist down onto the guard's face, knocking him into silence. As he raises his fist again, the guard holds up his hands and says "Wait! I can help y...hmpph." The guard slumps into unconsciousness as Eltariel plants his other fist into the man.

				After tying up the guard and making sure the gag is snug in his mouth, your party creeps forward into the town.


	*if (hellstorm > 1) #"I'll have my demon distract him."
		*set hellstorm %+ 10
		Reaching deep within you, you call to the demon. You feel something begin to stir. A raspy voice sounds in your head, "Mast.. Master? You... you call?"

		Forming your thoughts, you think "Yes. I need you to distract that guard."
	
		"Eat the guard?"
		*fake_choice
			#"Go ahead."
				"Master... commands."
		
				You feel the demon leave you and see a small smoky line trail towards the guard. The smoke rises until it is directly above the guard. It slowly begins to swirl, forming a oval. Almost too quick to see, you spot and enourmous mouth of teeth jut from the oval and close around the man's head, severing bone and muscle in one clean bite. Then the portal is gone and you watch the smoke seep back into your pores.

				A bit revolted, you slowly stand alongside your companions and make your way into town.
			#"Absolutely not."
				"Yes... Master."
					
				You feel the demon leave you and see a small smoky line trail towards the guard. Wrapping itself around the man's head, you watch the smoke suddenly dart into the man's ear. Immediately the guard pulls out his sword and runs over to the next outpost, wailing a fearsome war cry. Not waiting to see what happens, you and your companions quickly stand and make your way into town. After several more shouts, you feel the demon re-enter you.
				
			#"It's up to you."
				"Hmm... choice. Is... choice... not just... scripted words?"
			
				Puzzled, you feel the demon leave you and see a small smoky line trail towards the guard. The smoke rises until it is directly above the guard. It slowly begins to swirl, forming a oval. Almost too quick to see, you spot and enourmous mouth of teeth jut from the oval and close around the man's head, severing bone and muscle in one clean bite. Then the portal is gone and you watch the smoke seep back into your pores.

				A bit repulsed, you and your party advance into the town.
				

	*if (necromancy > 1) #"I'll have an undead distract him."
		*set necromancy %+ 10
		Focusing on the earth around you, you feel several presences. Locking on to one of the stronger ones, you compel it to rise. That same icy feeling washes over you. A few feet away from you, a shallow grave erupts as an armored man rises. Clutching a shattered spear, the undead lurches towards the guard at a terrifyingly fast speed. Shrieking in surprise, the guard fumbles with his sword as he desperately backs away. 

		Hearing his cries of alarm, several other guards come running. The undead throws itself at the first guard, stabbing and biting. The man screams in pain as he falls. The other guards cry out in anger and bring their swords and hammers to bear. A few moments later, the undead lies in pieces at their feet. One guard runs over to the first man and checks his pulse. "Junter is still alive! Help me bring him to the infirmary!" They rush away, leaving the path into town wide open. 

		Cautiously, your party stands and begins to sneak forward.


*page_break
Fis is... different.

The error shows up at the *if (hellstorm > 1) blah blah blah

The error reads “Not a number”

Any ideas? Thanks

1 Like

I think you need to show where you create the variable hellstorm and where you input value to it, was it made to contain number or character.

1 Like

In startup: *create Hellstorm 0
Place where it changes: *set Hellstorm 30

1 Like

hellstorm
image
image

necromancy
image
image

image
funny, I found no error in your codes

1 Like

Weird… it worked before, but then I threw it into random and quick test and it all buggered out

1 Like

You sure it’s “hellstorm” and not “hellstrom” somehow?
Otherwise, try to match up the caps on both instances of the variable’s name.

2 Likes

Perform a search for the variable’s name and check if you haven’t assigned a non-numeric value at any point by accident.

3 Likes

Are you still having this error? This is the debug technique that I use for situations like this one:

Remove everything that’s nested under that # option (copy it over to an outside file) and try running quickest without it. If the error recurs, you’ve learned that the line number indicating where the error is, is misleading. If the error disappears, add back the code you removed, one line at a time, until the error comes back. That way, you can isolate exactly what’s causing the error, and it’ll make it much easier to fix.

Some things work in playtest and not in quicktest and it’s not always easy to predict what.

1 Like

I actually just figured it out right this second haha. I literally only turned the (hellstorm > 1) into (hellstorm > 10) and it worked. No idea why, but thank you choice script gods I guess :joy:

2 Likes