Why am I getting an error on 11 and 12?

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

User avatar
Tdarcos
Posts: 9556
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Why am I getting an error on 11 and 12?

Post by Tdarcos »

I have

Code: Select all

verb "go"
	* "11"/"12"/"13"/"14"/"15"/"16"/"17"/"18"/"19"											DoGoCube
	* "21"/"22"/"23"/"24"/"25"/"26"/"27"/"28"/"29"											DoGoCube
	* "31"/"32"/"33"/"34"/"35"/"36"/"37"/"38"/"39" 											DoGoCube
	* "to"/"into" "21"/"22"/"23"/"24"/"25"/"26"/"27"/"28"/"29"								DoGoCube
	* "to"/"into" "31"/"32"/"33"/"34"/"35"/"36"/"37"/"38"/"39" 								DoGoCube
	* "to"/"into" "11"/"12"/"13"/"14"/"15"/"16"/"17"/"18"/"19"								DoGoCube
So that in a certain area they can select a square number. Which works okay for 13-19, 21-29, 31-39 but does not work for 11 and 12.
Transcript:

>go 19
DoGoCube executed
object is 0 xobject is 0
Using word 19

>go 13
DoGoCube executed
object is 0 xobject is 0
Using word 13

>go 12
You haven't encountered anything like that.

>go 11
You haven't encountered anything like that.

>go 21
DoGoCube executed
object is 0 xobject is 0
Using word 21

>go 31
DoGoCube executed
object is 0 xobject is 0
Using word 31

>go 39
DoGoCube executed
object is 0 xobject is 0
Using word 39

>go 10
You haven't encountered anything like that.

>go 9
That doesn't make any sense.

>go 1
You haven't encountered anything like that.

Note that I haven't defined 10 or 1.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."

User avatar
Tdarcos
Posts: 9556
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

I found the problem. In order to give the breakers numbers to trip, I numbered them

Code: Select all

object breaker_stove "stove"
{
	in fusebox
	article "a"
	adjectives "stove","10"
	is static,  switchedon, hidden, breaker
	Darkens nothing
}

object breaker_microwave "microwave"
{
	in fusebox
	article "a"
	adjectives "microwave","11"
	is static,   switchedon, hidden, breaker
	Darkens nothing
}
object breaker_fridge "refrigerator"
{
	in fusebox
	article "a"
	adjectives "fridge","12","refrigerator"
	is static,  switchedon, hidden, breaker
	Darkens nothing
}
I'm thinking this might be it, having a different object with the same numeric name. Problem is that I added the following:

Code: Select all

verb "go","goto"
	* "11"/"12"/"13"/"14"/"15"/"16"/"17"/"18"/"19"											DoGoCube
	* "21"/"22"/"23"/"24"/"25"/"26"/"27"/"28"/"29"											DoGoCube
	* "31"/"32"/"33"/"34"/"35"/"36"/"37"/"38"/"39" 											DoGoCube
And I get this:

[Transcript]


>go 13
DoGoCube executed
object is 0 xobject is 0
Using word 13

>go 12
You haven't encountered anything like that.

>goto 12
DoGoCube executed
object is 0 xobject is 0
Using word 12

>goto 13
DoGoCube executed
object is 0 xobject is 0
Using word 13

>goto 11
DoGoCube executed
object is 0 xobject is 0
Using word 11

>go 11
You haven't encountered anything like that.

This is damned wierd. I'm going to change the fuse numbers and see if this has an effect.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."

User avatar
pinback
Posts: 17919
Joined: Sat Apr 27, 2002 3:00 pm
Contact:

Post by pinback »

What's a "fuse box"?
When you need my help because I'm ruining everything, don't look at me.

User avatar
Tdarcos
Posts: 9556
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Tdarcos wrote:This is damned wierd. I'm going to change the fuse numbers and see if this has an effect.
Yep. I changed the identifiers for the breakers to 60, 61, and 62, now "go 11" and "go 12" work.

Weird the way one definition can interfere with the other.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."

User avatar
Ice Cream Jonsey
Posts: 30184
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

Is a fuse box similar to circuit breakers?
the dark and gritty...Ice Cream Jonsey!

User avatar
Tdarcos
Posts: 9556
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."

User avatar
Tdarcos
Posts: 9556
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Ice Cream Jonsey wrote:Is a fuse box similar to circuit breakers?
JESUS, MARY, MOTHER OF GOD -- NOBODY FUCKING GIVES A SHIT.
- Ice Cream Jonsey, 9/12/12, http://www.joltcountry.com/phpBB2/viewtopic.php?t=8499
[/quote]
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."

Post Reply