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.

Author
Message
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 26th Oct 2011 16:49
I am working on my level editor and now i want to make my editor save maps i create, i create simple brush object and want to save it but it doesn't seem to work, nothing isn't written in file. What i had in mind was to check for all existing objects and determine witch is witch object like code below



but now i am not certain will this work in any way. Why i don't get anything written in the file and is this secure way to this thing i i have two object types will there be conflict with object id's and should i put different objects in dims?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Oct 2011 18:26 Edited at: 26th Oct 2011 18:55
Looks like maybe you should be creating a UDT array rather than a single UDT object.

Something like this?


nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 26th Oct 2011 18:45
ok, i already had that in my code earlier but when i decided to write all data to file str$(Brush.id) and other stuff won't write to file, so how should i use this array?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Oct 2011 18:55
I changed that part in the code I posted, you need to use the array format for getting the data back out (with parentheses)

nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 27th Oct 2011 00:38
i am not sure how to do this i get data like this



and i want to save that data to file like this



this Brush(i).id=Brush.id must be Brush(i).id=i to compile and the line below then returns error

how should i do this?

Login to post a reply

Server time is: 2026-07-11 02:55:23
Your offset time is: 2026-07-11 02:55:23