Qbasicnews.com

Full Version: Undefined Reference
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Im working on a game and for some reason when i compile it it gives me
Quote: FBIDETEMP.o:fakeSad.text+0x1c9) undefined reference to 'LAST'
FBIDETEMP.o:fakeSad.text+0xc35) undefined reference to 'LAST'
The last it is refering to is an array inside a type
Code:
last(4*(25*25)+4) as byte

I can't figure it out i tried changing the name and that didnt work
be shure that you use the whole name to the array and use option explicit.
Code:
type  mytype
  last(4*(25*25)+4) as byte
end type
dim as MyType test
test.last(anyindex)=any value
not
last(anyindex)=any value

Joshy
hmm i looked at the code and it looks like the problem is here:

Code:
for i= 0 to ubound(enemy)
    put (enemy(i).x,enemy(i).y),enemy(i).pic,trans
    get (enemy(i).x,enemy(i).y)-(enemy(i).x+enemy(i).w,enemy(i).y+enemy(i).h),enemy(i).last
next
I think you need to specify an index in enemy(i).last.
E.g., enemy(i).last(x) or whatever.
nope thats not it mabye its my compiler its 0.14
Funny, because my compiler (v.15) doesn't allow me to reference an array unless I supply an index.
Nevermind i figured it out i just need to add an @ at the beggining of it when GETing it