Try this,
load object "path\your object name", your object number
load image "path\your texture name", your texture number
Quote: "
It still won't work, i need the object to be g22_mdl, if it is g22_mdl = 1, it is 1, not g22_mdl.
I am not making much sense am I. "
You don`t have full understanding of this that`s because you are not making much sense.You want your object to be g22_mdl and if you call "load object" properly the object you want is loaded.You also point that object number is not equal "g22_mdl", and there is no need to be, and it can`t be.Because there must be assigned number and not a name, so you get the error in the first place.
EDIT: I forget to answer your question.The only way to use a name instead of number for your object is to assign the number to a proper variable and use it`s name instead,in your case you need integer variable with name g22_mdl, as Jaeg showed in his snipet.
Where there is a will, there is a way.
I often edit my posts, that`s who i am