Error / warning messages not highlighting correct line or file

Previous topic - Next topic

AndyH

I have a project with many source files.

I referred to two variables x and y which did not exist, I should have referred to something different.  GLB's compiler correctly warned me that these will be globals however it reported the wrong file and line number which made tracking down where I'd made the mistake frustratingly hard.

Here's the message it gave me:

*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.2008.073 - 3D, NET
"Languages.gbas"(31) warning : implicitly created GLOBAL  : x
"Languages.gbas"(31) warning : implicitly created GLOBAL  : y

Languages.gbas is another file, and line 31 is the last line of that file.  Can this be corrected?

bigsofty

I got this once or twice, sometimes it refers to the 1st line as well....

I exited the IDE, reloaded and compiled, it then referred to the correct error line.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

AndyH

LOL, I've done it again...

*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.2008.073 - 3D, NET
"Languages.gbas"(31) warning : implicitly created GLOBAL  : x
"Languages.gbas"(31) warning : implicitly created GLOBAL  : y

Another function, I should be referring to ed.x and ed.y not x and y ... this time I hadn't written too much code so I knew where to look (yes not in languages.gbas! ;))

I've not tried quiting GLB and loading up fresh, but it always seems to give this same error for me.  Languages.gbas is the last one in the list on the output window so I guess something must be mopping up globals at the end:

compiling:
IncrediBuild skips: MouthTrap.gbas, ovineBanks.gbas, ovineShapes.gbas, ovineSprites.gbas, ovineHelpers.gbas, LevelEditor.gbas, ovineInputs.gbas, Titles.gbas, Languages.gbas,


Can you do anything to fix this Gernot?

Kitty Hello

Yes, I've noticed that, too. I've got to dig into this one.
Found it. Fixed in next update. I was using the wrong file index for the warning.