Why doesn't this code work?
Blitz3D Forums/Blitz3D Programming/Why doesn't this code work?
| ||
For some strange reason this code brings up an" expected END FUNCTION" call. I've doublechecked the code with the Blitz3d docs. It looks like all the syntax is entered correctly. The reason why I know it is the PositionMesh command that is causing the problem is that I remmed it out with ; and I get an Memeory access error. I removed the instruction entirely and the program ran fine, a perfect black screen. |
| ||
Not sure if this is something you've forgotten in the code posted above but "info" should either be a global variable or passed into the other functions that write to that stream, otherwise it will have a zero value in the other functions and writing to the stream won't work. I'm sure you would have checked that the mesh is a valid mesh file and that it exists in the folder you've changed to. What happens if you run it in debug mode? |
| ||
Thanks for the advice about info. Maybe that is what is causing the Memory access. BTW, now that I know that DebugLog exists, I've decided to use that instead of reinventing the wheel. If by checking a valid mesh, you mean If DIE = 0 then ; mesh didn't load yes, I've done that, but the program crashes before it reaches that line, or it doesn't compile? |
| ||
Despite the misleading message the syntax error has been correctly located, as indicated by the position of the cursor. It is a missing comma. |
| ||
Floyd, you're fantastic, you're groovy, you're uncanny. You like Pizza or Carl's jr Famous Stars. Your next meal is on me!!! |
| ||
Yeah - we've all done that. Doh! |
| ||
Your next meal is on me!!! He's going to eat food off your body? |
| ||
Aww, come on guys, you've been logging on too many adult sites!! Hehe |