array declaration and data assignment
type VDS
ID as integer // sprite ID
data as string // Sprite actual piece
note as string // Active notes
lref as integer // location in grid xy 22-77
endtype
VData as VDS[36]
VData[0].ID = 12 : VData[0].data = "0" : VData[0].note = "0" : VData[0].lref = 22
...
VData[35].ID = 47 : VData[35].data = "0" : VData[35].note = "0" : VData[35].lref = 77
Attempting to search array with 'x = VData.lref[i]'
I get a compiler error telling me the array isn't defined.
If I delete that line, it compiles just fine. I've also tried x = VData[i].lref which also tells me the array is undefined. The entire function is as follows.
function change(y,x)
g$ = str(y)
h$ = str(x)
g$ = g$+h$
y = Val(g$)
z = 0
for i = 0 to 48
x = VData.lref[i]
if y = x then z = i
next i
endfunction z
main.agc:226: error: "vdata" has not been defined as a type
I've got no clue what this means.