problem load Mesh

Blitz3D Forums/Blitz3D Programming/problem load Mesh

Yue(Posted 2012) [#1]
Hi I have a problem loading a mesh, the message returns me is: Entity is not Mesh "

Any suggestions.




Zethrax(Posted 2012) [#2]
In the lines:-

Yue = LoadAnimMesh("Yue.b3d")
YuePX = LoadAnimMesh("YuePX.b3d")

you're not actually testing to see if the models were loaded correctly. Replace these with:-

Yue = LoadAnimMesh("Yue.b3d")
YuePX = LoadAnimMesh("YuePX.b3d")
If Yue = 0 Then RunTimeError "Yue model failed to load."
If YuePX = 0 Then RunTimeError "YuePX model failed to load."

and that should tell you if the problem lies with the files or filepaths.

What line was highlighted in the Bltz3d debugger when the problem occurred? Once you find that out, put Cls : Print <entity-handle-variable> : Waitkey : End code (where <entity-handle-variable> is the name of the variable that holds the suspect entity handle) before the command where the error occurs to print the value of the entity handle that is causing the crash.

Debugging is largely about doing stop-checks (stop the execution and return information that tells you about what's really going on with the code execution) to zero in on where the execution of the code deviates from what you need or expect to be happening..