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 / Open to Read lines

Author
Message
Master SeePlusPlus
13
Years of Service
User Offline
Joined: 30th Dec 2012
Location:
Posted: 15th Jul 2014 00:49
Hey.

So, basically I am writing the 3 camera positions and 3 camera angles (XYZ) into a few files at certain points, with each on different lines. How would I go about using the open to read command but truncating different lines for use?

Thanks
MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 15th Jul 2014 00:59
Well, you can use read string and know the order of lines in the file saved. Like if you have angle coordinates in the fith line you can use read string 1, ang$ five times and use the setting from the fith read string command!

Alex Matei CEO
www.alexmatei.com
Master SeePlusPlus
13
Years of Service
User Offline
Joined: 30th Dec 2012
Location:
Posted: 15th Jul 2014 01:01
Oh does it only read one line at a time?
Master SeePlusPlus
13
Years of Service
User Offline
Joined: 30th Dec 2012
Location:
Posted: 15th Jul 2014 01:08
Here is what I currently have (in the loop with a sync) and it does not work.


abc1-3 are camera positions and 4-6 are angles. I am worrying about position first.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 15th Jul 2014 01:14
Alternatively you can use something like STYX or Matrix1Utils to read INI or XML etc. files and write to them too... [You can thus specify what you want to load instead of reading line by line]

MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 15th Jul 2014 01:14
Try putting the sign "#" after abc or just make it as read string and convert the string variables to floats.

Alex Matei CEO
www.alexmatei.com
MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 15th Jul 2014 01:15
Or as MrValentine said.

Alex Matei CEO
www.alexmatei.com
pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 15th Jul 2014 01:59 Edited at: 15th Jul 2014 02:12


windowsXp
Master SeePlusPlus
13
Years of Service
User Offline
Joined: 30th Dec 2012
Location:
Posted: 15th Jul 2014 02:26 Edited at: 15th Jul 2014 02:37
ok so here is my current code, but for some reason the camera goes to a certain location right away then (i have camera position displaying) the camera position changes to strange numbers like 7.00023-02 constantly until all log files are read. whats wrong lol



EDIT: wrote strings, read float.. gonna fix
Master SeePlusPlus
13
Years of Service
User Offline
Joined: 30th Dec 2012
Location:
Posted: 15th Jul 2014 02:39
IT WORKS! I Love each and every one of you
MateiSoft Romania
12
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 15th Jul 2014 11:32
Glad to help

Alex Matei CEO
www.alexmatei.com

Login to post a reply

Server time is: 2026-07-06 04:29:23
Your offset time is: 2026-07-06 04:29:23