Custom Type Name error
Blitz3D Forums/Blitz3D Programming/Custom Type Name error
| ||
here is structure im playing with Type Light_Source Field ID Field Name$ Field Range# Field Intensity# Field Speed# Field Distance# End Type and here is Types sort routine im using, in order to sort all light sources based in Distance# ;------------------------------------------------------------- Local Item.Light_Source, NextItem.Light_Source, p.Light_Source Local temp# NextItem=After After First Item <------ This is line where error is reported, pointed on to NextItem Repeat If NextItem = Null Then Return Item = NextItem : NextItem=After NextItem temp#=Item\Distance# : p = Before Item While temp# < p\Distance# p = Before p Wend Insert Item After p Forever ;------------------------------------------------------------- All data about Types fields are processed, entered before so its fine, I have checked it..now, when i run program, I got "custom type name name not found" error...what confusing me is when i isolate same routine and data outside of main program and test as separate program, its working...what im doing wrong here?? |
| ||
The After operator refers to a particular object, so NextItem=After NextItem is correct usage. The First operator refers to the entire list for a user defined type. You need NextItem=After After First Light_Source |