Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Dark GDK and Fscanf problem ....

Author
Message
Freeker
16
Years of Service
User Offline
Joined: 8th May 2008
Location:
Posted: 28th Jun 2008 03:51
hey all !!
I was trying to write a save/load function in form of a .txt file (coordinates of objects would save themself in a form of a file.)
save function is working well and for that i use fprinf() function, but when i try to use fscanf to read from a file it doesnt work ....all wariables i read are 0 and when i try to use brak point to debug my program when i get to fscanf function it says "There is no source code available for the current location." and it want me to browse for a file named "fscanf.c" if i try to breakpoint at the load function it is the same for the fprintf but that function works just fine .....
i hope someone can help me ...
cheers, Compufreek

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 28th Jun 2008 16:34
Is the file open for read and write?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
SunDawg
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Massachusetts
Posted: 28th Jun 2008 23:37
Break points don't work properly with the GDK, as far as I know. You'll have to debug with other methods.

Did you try compiling in 'release' mode?


My site, for various stuff that I make.
Freeker
16
Years of Service
User Offline
Joined: 8th May 2008
Location:
Posted: 30th Jun 2008 14:58
yes, file is opened to read/write and i tried the same code in win32 console application and there it works fine ...

i have realised that dark gdk have some write/read functionality ....can someone direct me to a tutorial for it ? all i need is that i can read or write float's and string's from or to file one by one.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 30th Jun 2008 20:48
break points work fine for me - You're code doesn't show the data declarations - nor the open stuff like Lilith said.

Freeker
16
Years of Service
User Offline
Joined: 8th May 2008
Location:
Posted: 30th Jun 2008 22:00 Edited at: 1st Jul 2008 04:20
this is how i open file



PS. Could annyone tell me how to display variables ?
i use dbText () to write something on the screen but how would i display variables ?
Freeker
16
Years of Service
User Offline
Joined: 8th May 2008
Location:
Posted: 8th Jul 2008 17:58
hey .... i have another problem and i just tought il use this thread. I made a tree in milkshape and used a transparent .png texture. In milkshape it looked fine but when i tried to put it in my game the transparent texture that was representing leaves had its transparency changed to black. I fixed the problem setting the tree's alpha channel to 99% but the result is this:



why it renders the background and not the wall or house? my background is a skybox object.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 9th Jul 2008 02:06
there are different flags - this extra param - I think either the set alpha mode call or something - that assigns different "rendering" "mechanisms" for this - some work better than others but you need to try them all. I might be in the load image deal, texture object call, or set object texture - I forget but its this "optional" flag that you need to play with. There isn't a perfect one - I'll say that! But depending on the scene - some work much better than others.

Login to post a reply

Server time is: 2024-11-20 15:38:59
Your offset time is: 2024-11-20 15:38:59