I got very tired of messing with the file numbers whenever loading a texture or a model so I wrote a very simple function that makes life a lot easier!
The main advantages are that you don't have to worry about entering duplicate object numbers, the loader routine solves this! And refering to file numbers is history because now you can refer to file/object names.
The standard Darkbasic routines look like this :
Load object "model.x",1
Position object 1,0,0,0
Whenever you want to address this model you will have to remember it's number. Check below how to get round this problem
My routine looks like this :
obj_EnemySpinner = LoadFile("models/enemies/enemy-spinner.x",1)
Position object obj_EnemySpinner,0,0,0
The line reads :
VariableName = LoadFile("filename",filetype) (1=model,2=texture)
If you have questions, mail me or reply to this post!