Hmm, I'm still having some problems. Also, yeah I've got DBP.
Here's what I got so far, but it doesn't seem to work.
If File Exist(Filename$)
Open To Read 1,Filename$
Read String 1,T$: health = Val(T$)
Read String 1,T$: ammo = Val(T$)
Read String 1,T$: maxammo = Val(T$)
Read String 1,T$: clips = Val(T$)
Read String 1,T$: maxclips = Val(T$)
Read String 1,T$: maxsprint = Val(T$)
Read String 1,T$: showbounds = Val(T$)
Read String 1,T$: set_gravity# = Val(T$)
Read String 1,sens$: sensitivity# = Val(sens$)
Close File 1
else
health = 100
ammo = 30
maxammo = 30
clips = 5
maxclips = 5
maxsprint = 100
showbounds = 0
set_gravity# = -0.1
sensitivity# = 3
Endif
endif
It seems to open it as it doesn't use the "else" function, but it doesn't seem to use the actual things it reads.
Do I have to save the values to variables? If so, how?
Here's what I use for one of the variables:
yrotate object 2,object angle y(2)+mousemovex()/[b]sensitivity#[/b]
xrotate object 2,object angle x(2)+mousemovey()/[b]sensitivity#[/b]
Also, that is all that is in the text file, I removed the useless commands before and after the variables.