yeh removing the shader works,i was just missing the step of flushing out the stages in the image!
I had an after_run function anyhow,so put it there like so:
function after_run()
for n=1 to maxobjects
if object[n].id>0
setobjectposition(object[n].id,object[n].x#,object[n].y#,object[n].z#)
setobjectrotation(object[n].id,object[n].rotx,object[n].roty,object[n].rotz)
if object[n].physicsbody>0
Delete3DPhysicsBody(object[n].id)
endif
if object[n].shader>0
select object[n].shader
case 1
SP_Glass_removeObject(object[n].id)
endcase
case 2
SP_Toon_removeMesh(object[n].id,1)
endcase
case 3
SP_XRay_removeObject(object[n].id)
endcase
case 4
SP_Wireframe_removeObject(object[n].id)
endcase
endselect
endif
for i = 1 to 4
SetobjectImage(object[n].id,0, i)
next i
setobjectimage(object[n].id,object[n].im,0)
endif
next n
for n=1 to 1000
if get3dparticlesexists(n)
Delete3DParticles(n)
endif
next n
if Get3DPhysicsCharacterControllerExists(player[playerpointer].id)
Delete3DPhysicsCharacterController(player[playerpointer].id)
endif
setsunactive(0)
SetSkyBoxVisible(0)
SetSkyBoxSunVisible(0)
endfunction
of course I also had to put it in the places where I would delete an object that had a shader assigned to it within the engines Level editor,just before resetting all the objects values.
all is cool now..zero errors so forth
Hail to the king, baby!