Page 1 of 1
Really big bug: hugo won't print numbers
Posted: Thu Sep 22, 2011 11:10 pm
by Tdarcos
I noticed this when I was trying to print the street number, that they weren't showing up. So I tried a test program, X.hug:
Code: Select all
global X
routine main
{
print "Start "; 5
x = 8
print "Second item "; x
}
With no words it prints nothing; with the words it prints the words but not the numbers. It doesn't print the numbers at all. This is weird.
Posted: Fri Sep 23, 2011 1:37 am
by Roody_Yogurt
You have to use the
number token:
Code: Select all
global X
routine main
{
print "Start "; number 5
x = 8
print "Second item "; number x
}
Otherwise, it thinks you are referring to an object number.
Posted: Wed Sep 28, 2011 5:29 pm
by Tdarcos
Roody_Yogurt wrote:You have to use the
number token:
Code: Select all
global X
routine main
{
print "Start "; number 5
x = 8
print "Second item "; number x
}
Otherwise, it thinks you are referring to an object number.
Thanks! I'll try that; It was pissing me off, I was afraid my work on this game was going to be wasted. I had stopped working on
City of Zenith because of this number problem; if numbers couldn't be displayed the Hugo game system was worthless.
Posted: Wed Sep 28, 2011 7:31 pm
by Ice Cream Jonsey
Well, we're all really glad you checked back in. We NEED this game, and I am willing to beta-test.
Posted: Thu Sep 29, 2011 1:34 am
by Flack
Wouldn't be odd if, in all the years that Hugo has been out, and all the authors that had programmed using it, and all the games that had been created with it, and all the people who had played those games, that no one had ever tried printing a number?
Posted: Thu Sep 29, 2011 6:55 am
by Tdarcos
Flack wrote:Wouldn't be odd if, in all the years that Hugo has been out, and all the authors that had programmed using it, and all the games that had been created with it, and all the people who had played those games, that no one had ever tried printing a number?
Look, Flack, it doesn't mention this in the goddam manual. And people might simply have worked around it. Internally, you can't print a number anyway. You have to write a routine to change it into the component digit string it represents, then print that string. There can be assist packages such that some machine instructions do the translation for you, but the translation has to be done before a number can be written, unless you're going to write it as the raw binary value it actually is.
Posted: Thu Sep 29, 2011 10:26 am
by Roody_Yogurt
Actually, it's mentioned on page 58 of the Hugo Book (page 68 according to the PDF reader) in the section about printing stuff. I'd be lying if I said I never ran into the same problem, though.