Hi all,
Ive written a function in DBPro that uses both local variables, the function parameters, and some global variables. The problem I have is that some of the global variables are not being recognised whereas some of them are.
planet = nextmemblock
inc nextmemblock
make memblock planet, PlanetSize
Basically I've got command to create a memblock, and the variables planet and PlanetSize only work if I substitute in constant numbers for the variables, otherwise I get errors 5101 (memblock number illegal) and 5107 (memblock size illegal). In another part of the same function I am using other global variables which contain the offset location for various sections within this memblock. I do not get errors for these, although my function does not appear to work at all anyway - do these still cause a problem and are just not being reported?
In case you're wondering, the reason I'm doing this is to get around not being able to pass user-defined types as function parameters
so I'm passing a memory location instead.