[Inform] Daemons! Argh!

G

Guest

Guest
Archived from groups: rec.games.int-fiction (More info?)

Hello all,

I am new to Inform, and am having some difficulty with daemons.
You see, I have a daemon in my code, whose syntax and code have been
triple checked, and yet when I insert it into my masterpiece, I get 78
compile errors!
Would anyone be willing to lend me a hand? An excerpt from the code of
the effected object follows. Of course, "StartDaemon(obj);", has been
defined elsewhere.

var 0,
daemon [; switch (++obj.var){
1: print "";
7: print "";
9: print "";
11: StopDaemon(obj); deadflag = 1; print "";
],

Thanks in advance for any help,
Gulphx
 
G

Guest

Guest
Archived from groups: rec.games.int-fiction (More info?)

"Gulphx" <gulphx@yahoo.com> wrote in message
news:25660f95.0404172001.61811f72@posting.google.com...
> Hello all,
>
> I am new to Inform, and am having some difficulty with daemons.
> You see, I have a daemon in my code, whose syntax and code have been
> triple checked, and yet when I insert it into my masterpiece, I get 78
> compile errors!
> Would anyone be willing to lend me a hand? An excerpt from the code of
> the effected object follows. Of course, "StartDaemon(obj);", has been
> defined elsewhere.
>
> var 0,
> daemon [; switch (++obj.var){
> 1: print "";
> 7: print "";
> 9: print "";
> 11: StopDaemon(obj); deadflag = 1; print "";
> ],
>
> Thanks in advance for any help,
> Gulphx

The obvious error in your code is the missing braces...

object d with var 0,
daemon [;
switch (++self.var){
1: print "";
7: print "";
9: print "";
11: StopDaemon(self); deadflag = 1; print "";
}
];

I seems to compile fine when fixed.
 
G

Guest

Guest
Archived from groups: rec.games.int-fiction (More info?)

Also, this sort of question is best asked on rec.arts.int-fiction.
Cheers,

-Jim
"onyxring" <Jim(At)OnyxRing(Dot)com@nospam.com> wrote in message
news:wbpgc.931$pg.373@okepread05...
> "Gulphx" <gulphx@yahoo.com> wrote in message
> news:25660f95.0404172001.61811f72@posting.google.com...
> > Hello all,
> >
> > I am new to Inform, and am having some difficulty with daemons.
> > You see, I have a daemon in my code, whose syntax and code have been
> > triple checked, and yet when I insert it into my masterpiece, I get 78
> > compile errors!
> > Would anyone be willing to lend me a hand? An excerpt from the code of
> > the effected object follows. Of course, "StartDaemon(obj);", has been
> > defined elsewhere.
> >
> > var 0,
> > daemon [; switch (++obj.var){
> > 1: print "";
> > 7: print "";
> > 9: print "";
> > 11: StopDaemon(obj); deadflag = 1; print "";
> > ],
> >
> > Thanks in advance for any help,
> > Gulphx
>
> The obvious error in your code is the missing braces...
>
> object d with var 0,
> daemon [;
> switch (++self.var){
> 1: print "";
> 7: print "";
> 9: print "";
> 11: StopDaemon(self); deadflag = 1; print "";
> }
> ];
>
> I seems to compile fine when fixed.
>
>
 
G

Guest

Guest
Archived from groups: rec.games.int-fiction (More info?)

> Also, this sort of question is best asked on rec.arts.int-fiction.

Yes, you are absolutely correct about that!

As I just posted on rec.arts.int-fiction:
My sincere apologizes for any annoyance I may have caused anyone. I do
know the rules, but somehow managed to get the newsgroups mixed up.
I'm terribly sorry about that. Trust me, it won't happen again!

In closing, *please* don't judge my intelligence by my first two
postings!

Gulphx
(And by looking at the spelling errors in my message, I should go pick
up Nort and Bert!)