scanf/fscanf problem with an OBJ reader

Member
Posts: 281
Joined: 2009.04
Post: #46
Ok, none of OSC's code is useable to me, as I'm using C. it says my current working directory is Resources, so I move cube.obj to there. When I run my app it doesn't display the error message I preprogrammed, but It still loads into gdb.

~ Bring a Pen ~
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #47
mikey Wrote:When I run my app it doesn't display the error message I preprogrammed, but It still loads into gdb.

By "loads into gdb", I assume you mean you're running it with a debugger attached and it breaks on that line of code. So...debug it. We can't help you much when all you've said is essentially "here's my code, it's broken, I think it might have something to do with this line here". If you have specific questions about how to use your debugging tools, or you track down the error to a certain point and can't figure out beyond that why it's happening, then we might be able to help (if you actually post enough detail for us to know what you've done and what you need answered to get further), but you'll need to put in the initial effort yourself.
Quote this message in a reply
Moderator
Posts: 373
Joined: 2006.08
Post: #48
mikey Wrote:Wacko erm, because it means my code is faulty (and gdb is quite hard to understand).

It's actually a good thing that your program is able to load in to GDB, as that's what you use to debug programs. If GDB dies loading your program, then you've got a really big problem XD

As unknown pointed out, just because
Code:
fopen("cube.obj" , "r") == NULL

is false, doesn't mean that
Code:
objfile==NULL
is false Wink

Worlds at War (Current Project) - http://www.awkward-games.com/forum/
Quote this message in a reply
Member
Posts: 281
Joined: 2009.04
Post: #49
Ahah! It works! Now I've fixed the OBJ loading, but the error is when I drawArrays. I'll figure out that one on my own.

Thanks very much to everyone who helped solve my problem SmileSmileSmile

~ Bring a Pen ~
Quote this message in a reply
Post Reply