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.

DarkBASIC Professional Discussion / Text file Problem

Author
Message
Jacob G
13
Years of Service
User Offline
Joined: 12th Jul 2012
Location:
Posted: 13th Jul 2012 06:53
Hello everyone Great Engine btw just got professional and im so excited. So i made a load map function taht loads the map. But when it loads the map it skips a couple of tiles.


Ive only had DarkBasic for about 7h or so and Please dont critizies of my coding is insufficient. But you can give me hints.

I think the problem is inside the for loop where i put ID, but if i fill ID with y or x i get the same problem so im stumped Please help me great community my goal is to adventually make a top down rpg game.

Jacob Gardam
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 13th Jul 2012 11:21
Hmm, nothing springs to mind at first or second glance. Could you perhaps explain more about what should happen and what actually happens in detail?

Also check that the file with the map data is in fact 100 bytes large (MapSize^2 = 10^2 = 100 bytes)

TheComet

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Jul 2012 14:32
I'm fairly sure you need to skip the end-of-line bytes at the end of each row - there's probably two of those. Here's a simple demo using your code with a couple of minor edits (attached).

I'm not sure off-hand whether there is a more elegant solution.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 13th Jul 2012 16:36
this is awkward... as I answered in your other thread and as did GG

Jacob G
13
Years of Service
User Offline
Joined: 12th Jul 2012
Location:
Posted: 13th Jul 2012 17:28
So its not evven workking now, it keeps saying cant find file, but i've checked the CASE and the file paths and it is all correct. Is there a way someoen could show me a map load but instead of once Variable of MapSize, maybe one for MapsizeX and MapSizeY.

Thanks

Jacob Gardam
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Jul 2012 18:53
Did you try the sample project I posted for you a few posts back?
RonsWare
15
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 14th Jul 2012 10:31
Did you used a project file ?

I always make one.

if you didn't that could be the problem.


Just let the editor generate one

Cheers Ron.

Programming is learning

Login to post a reply

Server time is: 2026-07-07 18:21:13
Your offset time is: 2026-07-07 18:21:13