Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Undefined Reference
#1
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
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply
#2
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
sorry about my english
Reply
#3
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
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply
#4
I think you need to specify an index in enemy(i).last.
E.g., enemy(i).last(x) or whatever.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#5
nope thats not it mabye its my compiler its 0.14
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply
#6
Funny, because my compiler (v.15) doesn't allow me to reference an array unless I supply an index.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#7
Nevermind i figured it out i just need to add an @ at the beggining of it when GETing it
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)