Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
import confusion
I like having my pathfinding code in a seperate file,
BUT the pathfinding code has to use an array from main.bas

I get error message saying
identifier 'UnitExists' is a function, not a var

but really its an array

I could put Dim UnitExists in the pathfinding.bas file

but what if another included file needs to reference UnitExists?

UnitExists needs to be 'global' somehow
The problem there is that UnitExist must be declared (included) before it's referenced for the 1st time.
Try to put the include at the beginning, and tell me.
having problems with imports again
please download the project
<!-- m --><a class="postlink" href=""></a><!-- m -->

and compile wars.bas

it says the function findpath is not found but its in pathfinding.bas

also it says the error is in wars.bas on line 23

but its really in movingfunctions.bas
Apparently the file pathfind.bas is entirely commented, because it starts with a block comment /' at the beginning.
I tried closing that block comming just before the FindPath funcion declaration and your program was correctly compiled :!:

Included are done by the preprocessor. So you can always try
zxbpp wars.bas and see the resulting souce file, as a first test to discard posible mistakes before going further.

Try removing /' in the pathfinding.bas file and tell me. :roll:
oh yeh it works now thanks!

Forum Jump:

Users browsing this thread: 1 Guest(s)