FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

Another strange thing...

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Hugella



Joined: 28 Jun 2004
Posts: 58
Location: Minneapolis, Minnesota

PostPosted: Tue Feb 08, 2005 7:04 pm    Post subject: Another strange thing... Reply with quote

**EDIT**

Well, it's working now. So, like, nevermind. I'd write up what the problem was, except I still don't know. I wasn't changing code at all, just compiling, running, deleting incorrect .hex, repeat, and suddenly it started to work.

Thanks to my ANONYMOUS BENEFACTOR for his kind assistance.





Okay, so I'm doing the time-honored thing of ripping off Kent's code and sticking it into my own to see what happens.

In this case, it's from Guilty Bastards: a simple 'version' routine:

Code:
routine Version
{
   color LIGHT_RED
   "\BGuilty Bastards\b"
   color TEXTCOLOR
   "Copyright (c) 1998 by Kent Tessman"
   print "\nRelease "; RELEASE; " "; serial$;
#ifset BETA_TEST
   " \B(beta-test version)\b"
#endif
   print newline
   "Written using the Hugo Compiler ";
   print HUGO_VERSION
   "\B(New players should type \"help\".)\b"
#ifset BETA_TEST
   "\n\B(NOTE:  This beta release is intended for testing only, not for
   distribution to the general public.  Please report any errors,
   bugs, etc. to the author.)\b"
#endif
#ifset DEBUG
   "\n\B(Compiled with DEBUG set)\b"
#endif
}


So. I stick 'Version' into my init routine, and the routine itself (changing the game/author name to my own) below the main routine (see end of message for my init), and the code does two things:

1) Describes the first room first. ("Empty room". This is a very empty room..")

2) Immediately after that, executes 'Version', but with GB/Kent still in the credits.

[edit] and 3) running the .hdx file through the debugger displays correctly. The engine isn't.


Is this some diabolical Tessmanian plot? What gives?

My Init routine:

Code:
routine Init
{
   display.title_caption = "Red River and Gulf"

   counter = -1         ! Player will start at turn 0.
   STATUSTYPE = 2         ! Display time.

   TEXTCOLOR = BRIGHT_WHITE
   BGCOLOR = DARK_GRAY
   color TEXTCOLOR, BGCOLOR

   cls
   
   Version

   prompt = ">"
   player = you

   location = emptyroom
   old_location = location      ! store player's last location before
               ! the current one.
   move player to location

   FindLight (location)      ! Dispels darkness in the start room

   DescribePlace (location)   ! Forces room title to appear without                ! typing 'look' first.

   location is visited      ! room has been visited

   #ifset USE_PLURAL_OBJECTS
      InitPluralObjects
   #endif
}
Back to top
View user's profile Send private message
Kent



Joined: 27 Jun 2003
Posts: 119

PostPosted: Tue Feb 08, 2005 10:26 pm    Post subject: Reply with quote

Man, I wish I'd *thought* to incorporate some sort of diabolical Tessmanian plot, but nope. Don't have that kind of vision.

Is it possible that the .hex file was getting compiled to a different place than the one you were running, i.e., that there were two .hex files? That's the only thing I can think of off the top of my head that might cause something like this.

Hopefully it's all working properly for you now.
Back to top
View user's profile Send private message
Guest






PostPosted: Wed Feb 09, 2005 6:38 am    Post subject: Reply with quote

Well, I did a Windows 'search' and the only relevant .hex was in the recycle bin.

Which brings up something else. For a while after I deleted the .hex (thinking I'd recompile and a new one would be created), the compiler wasn't even creating the .hex. (I had the directory open that I was working in, and it never appeared, either in the list of files or when I used the engine's 'browse' feature).

Eventually, I just restored the old .hex from the trash, (which was still displaying the GB title when running). Some number of compiles later, it started to work 'correctly'.

I don't know what else to say about this. I was using the all-GUI Hugo lineup (3.1.02 from 18 Jan).

I'll just chalk it up to a ghost in my machine, or my own (unknown) error somewhere along the line.

But thanks for the reply! :)
Back to top
Cryptonomic



Joined: 05 May 2004
Posts: 55
Location: Chicago, IL

PostPosted: Wed Feb 09, 2005 7:01 am    Post subject: Reply with quote

Anonymous wrote:
Which brings up something else. For a while after I deleted the .hex (thinking I'd recompile and a new one would be created), the compiler wasn't even creating the .hex. (I had the directory open that I was working in, and it never appeared, either in the list of files or when I used the engine's 'browse' feature).


I am wondering if this is because of settings (or lack thereof) in the hcwin compiler that you are using. I never use that myself. I just use the hc.exe to compile from a tool like SourceEdit.

However, to my point, if you go to the Options menu and click the Setup menu item, you will see path information that you can set. I have found that sometimes, if your source file does not specify specific directories with the @ directive, your .hex file ends up in other places. (Sometimes. I have never worked at isolating this but I do think part of this was the root of the problem I reported with my sound "issue" that apparently was not an issue at all.)

Just a thought.

- Jeff
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Hugella



Joined: 28 Jun 2004
Posts: 58
Location: Minneapolis, Minnesota

PostPosted: Wed Feb 09, 2005 11:43 am    Post subject: Reply with quote

I could go along with that if I hadn't done a full search of my entire hard drive (several times) for the file in question; it simply did not exist. It's why I found the whole thing so odd. It just wasn't *anywhere*.

As for the settings in the compiler, the only one set was the one to create a debuggable file. The .hdx would appear, but the .hex (after I deleted it) was never recreated.
Back to top
View user's profile Send private message
Cryptonomic



Joined: 05 May 2004
Posts: 55
Location: Chicago, IL

PostPosted: Wed Feb 09, 2005 12:12 pm    Post subject: Reply with quote

Hugella wrote:
As for the settings in the compiler, the only one set was the one to create a debuggable file. The .hdx would appear, but the .hex (after I deleted it) was never recreated.


Okay, that makes sense. (I think.) If you are setting the compiler to create an .hdx, it will not create a .hex until you turn off that setting in the compiler. With that setting on the object file created is always an .hdx file. The only time an .hex object file is created is if the Hugo compiler is *not* compiling a debuggable format object file.

- Jeff
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Hugella



Joined: 28 Jun 2004
Posts: 58
Location: Minneapolis, Minnesota

PostPosted: Wed Feb 09, 2005 2:41 pm    Post subject: Reply with quote

Well, I guess you learn something new every day! :)

Here's another one to throw at you, re: GUI compiler and the debugger: If I set it up with -d option, AND have 'run after compiling' checked, the debugger pops up and sits there until I tell it to run. If I check the run after compiling box WITHOUT also selecting the -d, the debugger pops up and gives the following error:

Hugo Debugger Fatal Error
File 'xxx.hex' not compiled as .hdx file. (Use -d switch, etc.)

Is that normal behavior?
Back to top
View user's profile Send private message
Cryptonomic



Joined: 05 May 2004
Posts: 55
Location: Chicago, IL

PostPosted: Wed Feb 09, 2005 3:07 pm    Post subject: Reply with quote

Hugella wrote:
Here's another one to throw at you, re: GUI compiler and the debugger: If I set it up with -d option, AND have 'run after compiling' checked, the debugger pops up and sits there until I tell it to run. If I check the run after compiling box WITHOUT also selecting the -d, the debugger pops up and gives the following error:

Hugo Debugger Fatal Error
File 'xxx.hex' not compiled as .hdx file. (Use -d switch, etc.)

Is that normal behavior?


Hmmm. I am not seeing that. The manual says that a .hex file cannot be run through the debugger but I am doing that as we speak and it seems to be working for me. So I am not sure on that. (Specifically, I compile to .hex but set the "Run command" in the Setup screen to hdwin. That works fine.

Basically the "Build .HDX debuggable executable" option in the hcwin.exe compile options is what decides whether you are compiling to an .hdx or a .hex.

That said, I am trying this with the compiler that is designated "3.1 (Aug 7 2004)" in the Help | About information. I can try it on another version a little later on.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Cryptonomic



Joined: 05 May 2004
Posts: 55
Location: Chicago, IL

PostPosted: Wed Feb 09, 2005 5:13 pm    Post subject: Reply with quote

As an update, I cannot reproduce the behavior you describe with another compiler, which is given as "v3.1.02 (Jan 18 2005)" in the Help | About menu of the hcwin compiler.

So I am not exactly sure how you are getting that error.

I have found, however, that if I play around with the hcwin file, my output files do sometimes end up under the directory where I have hcwin.exe stored. And this is the case even though at the start of my story file I have the following:

Code:

@lib=c:\Hugo\Library31
@object=c:\Hugo\Jeff\Outer
@source=c:\Hugo\Jeff\Outer


Prior to playing around with hcwin.exe, the files were generated in the appropriate Outer directory. But when I start changing settings and doing things like that, it seems as if the compiler "gets confused" or something.

That said, I really do not use hcwin.exe anyway and it is because I have encountered a few oddities like this. I just make a call to hc.exe via my editor. My editor of choice happens to be SourceEdit. I could do something similar with other editors, as well.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended