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 / weird problem or have i just missed something

Author
Message
noobnerd
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 23rd Jan 2012 21:48
ok hello i have this very weird problem in my towerdefence game:

i have two UDT arrays, one stores the locations and states of the nodes that make up the map ( x/y/walls/...) and another that contains the data of the towers (x/y/angle/damage/...) then i use this piece of code :



to save the two arrays n() and t() into the files map1.map and map1.tow and i also store the HQlocation in Hqlocation.loc

all of this works fine i have a directory map1 and the correct files that seem to have correct sizes are in it.

but then i use this code :



to load the arrays, HQ location and background image.

everything works fine except the array t() which doesnt seem to load at all??

the arrays are declared like this ( prior to loading )


the gosub _loadmap: contains the loadings

the UDTs cant be important? neither contain anything really weird.

the result i get with this is that only the n() array seems to have loaded correctly??
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 24th Jan 2012 01:00
it would be better to zip & upload the project.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 24th Jan 2012 01:04
Quote: "the UDTs cant be important?"


They will be if the declarations for the saved and loaded versions don't match correctly.
noobnerd
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 24th Jan 2012 14:19
@ basjak, i would rather not do that as i atm are using some probably copyrighted images in my game as placeholders, and with all of this pipa sopa acta stuff going on i rather just avoid it

@green gandalf, i know but that triggers an crash error And that isnt happening
noobnerd
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 25th Jan 2012 13:21
found the problem!

as i thought i had just missed something... hate bugs like this

Login to post a reply

Server time is: 2026-07-10 13:45:09
Your offset time is: 2026-07-10 13:45:09