whenever i try to apply a new brush to a surface with an existing brush. i get an error in Renderworld saying array index is more than the max index amount.
i think it may be when i use this func
Function removesurfacebrush(surfid)
Local tbrsh,ttx0,ttx1,ttx2
tbrsh = CO_GetSurfaceBrush(surfid)
ttx0 = CO_GetBrushTexture(tbrsh,0)
ttx1 = CO_GetBrushTexture(tbrsh,1)
ttx2 = CO_GetBrushTexture(tbrsh,2)
If ttx0 <> 0 Then CO_FreeTexture(ttx0)
If ttx1 <> 0 Then CO_FreeTexture(ttx1)
If ttx2 <> 0 Then CO_FreeTexture(ttx2)
CO_FreeBrush(tbrsh)
End Function
the CO_ is there because i have a lib that checks wether im using b3dsdk or minib3d.
|