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 / Trying to reead in some saved data in my map editor, every value reading in as 640?

Author
Message
Vesper
14
Years of Service
User Offline
Joined: 22nd Nov 2009
Location:
Posted: 3rd Feb 2010 08:20
okay so I got everything to work except for my load system every time it loads it fills all the data correctly but it loads it as 640 which is annoying. Ill include a small ammount of source and the text file being read in:

save function:

load function:

map.txt


Show me your combat algorithms(programmers read this NOT in a programming state of mind)
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 3rd Feb 2010 19:49 Edited at: 3rd Feb 2010 19:51
I tried the loading code with the content of your map file and it works fine. The debugger shows that it's reading the values correctly and storing them into the array. The problem must be somewhere else, although I can't guess where. Is the file opened at all? You can use the file.is_open() function to check that.

Just a small observation, did you declare the dat array as: dat[301][11] or as dat[300][10]?
Vesper
14
Years of Service
User Offline
Joined: 22nd Nov 2009
Location:
Posted: 3rd Feb 2010 23:37
I did the 301 11...thats very interesting so maybe they are being converted somewhere?

Show me your combat algorithms(programmers read this NOT in a programming state of mind)

Login to post a reply

Server time is: 2024-11-20 05:21:54
Your offset time is: 2024-11-20 05:21:54