Compiling woes

G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

So,

I downloaded the source of GearHead,
stimulated by all the talk around FP.

I managed to install fp, xp for xcode and the source
but the building of the source sadly failed.

effects.pp(2209,10) Error: Illegal counter variable
effects.pp(2210,11) Error: Illegal counter variable

These lines are
for X := 1 to XMax do begin
for Y := 1 to YMax do begin

I noticed that XMax are defined in locale.pp,
so I added this to the implementation use clause ( it was already in
the interface use clause )
This did exactly squat for the existing errors and added this one :
effects.pp(119,12) Error: Duplicate identifier "LOCALE"

I am stuck, could any one help ?

T.

Mac OS X 10.3
Free Pascal Compiler version 1.9.8 [2005/02/20] for powerpc
 
Archived from groups: rec.games.roguelike.development (More info?)

konijn_ wrote:
> So,
>
> I downloaded the source of GearHead,
> stimulated by all the talk around FP.
>
> I managed to install fp, xp for xcode and the source
> but the building of the source sadly failed.
>
> effects.pp(2209,10) Error: Illegal counter variable
> effects.pp(2210,11) Error: Illegal counter variable
>
> These lines are
> for X := 1 to XMax do begin
> for Y := 1 to YMax do begin
>
> I noticed that XMax are defined in locale.pp,
> so I added this to the implementation use clause ( it was already in
> the interface use clause )
> This did exactly squat for the existing errors and added this one :
> effects.pp(119,12) Error: Duplicate identifier "LOCALE"
>
> I am stuck, could any one help ?
>
> T.
>
> Mac OS X 10.3
> Free Pascal Compiler version 1.9.8 [2005/02/20] for powerpc

Hi, I'm not sure it'll help
your situation but there are
two conditions for "for" cycle
variables:

1) they must be local (check whether are X,Y defined locally)
2) they must be ordinal (check if they're number,enumeration or char)

try and check these and maybe
you'll find out the solution.

good luck,
Jan
 
Archived from groups: rec.games.roguelike.development (More info?)

konijn_ wrote:
> So,
>
> I downloaded the source of GearHead,
> stimulated by all the talk around FP.
>
> I managed to install fp, xp for xcode and the source
> but the building of the source sadly failed.
>
> effects.pp(2209,10) Error: Illegal counter variable
> effects.pp(2210,11) Error: Illegal counter variable
>
> These lines are
> for X := 1 to XMax do begin
> for Y := 1 to YMax do begin
>
> I noticed that XMax are defined in locale.pp,
> so I added this to the implementation use clause ( it was already in
> the interface use clause )
> This did exactly squat for the existing errors and added this one :
> effects.pp(119,12) Error: Duplicate identifier "LOCALE"
>
> I am stuck, could any one help ?
>
> T.
>
> Mac OS X 10.3
> Free Pascal Compiler version 1.9.8 [2005/02/20] for powerpc

Try FPC 1.0.10 instead. It may be that Joe was using the older 1.0 branch of
the compiler. I'm almost positive actually -- I ran into the same errors
when recompiling GenRogue on 1.9.8 from 1.0.10 . (if not, then try 1.9.x).
--
At your service,
Kornel Kisielewicz (charonATmagma-net.pl)
"Invalid thought detected. Close all mental processes and
restart body."
 
Archived from groups: rec.games.roguelike.development (More info?)

That would be problematic,
there is no 1.0.10 release for Mac OS X.

T.
 
Archived from groups: rec.games.roguelike.development (More info?)

Ahah,

the thingies are obviously not local,
I will just make local vars that get initialized with XMax and YMax.

Thanks a lot,
T.
 
Archived from groups: rec.games.roguelike.development (More info?)

Yep that worked,
I had to change the code a bit,
it looks dumber now ;(

Hat off for mr. Hewit,
that looks like good, well documented code.

Then again, a simple file stating which .pp file is the main file that
actually runs would have been nice.

T.
 
Archived from groups: rec.games.roguelike.development (More info?)

konijn_ wrote:
> Then again, a simple file stating which .pp file is the main file
that
> actually runs would have been nice.

In the sources I have, "compiling.txt" states this in a roundabout way.
It says to compile "arena", and there is only one file with that name.

Just FYI, main programs have the extension ".pas", whereas units have
the extension ".pp".
 
Archived from groups: rec.games.roguelike.development (More info?)

Yes you do,
I must have been blind.

You might want to refer to this file from the readme.txt

The thingy seems to work,
so I am going to play around with it.

T.