How do I save and load data?
Root / Programming Questions / [.]
HedrixCreated:
It looks like this...
dim map[8,8] 'real map is bigger, this is just an example For y=0 to 7 For x=0 to 7 Read c map[x,y]=c If c==3 and rnd(9)==0 then c=1 elseif c==3 and rnd(90)==0 then c=2 elseif c==3 then c=0 if c==0 then 'make the grass stuff's if c==1 then 'make the trees''this code isn't necessary for me to state, so I'm not including it in my example' if c==2 then 'make water' next next Data 1,1,1,1,1,1,1,1 Data 1,3,3,3,2,2,3,1 Data 1,3,3,2,2,3,1,1 Data 1,3,3,2,2,3,3,1 Data 1,3,3,3,3,3,3,1 Data 1,3,0,0,0,2,3,1 Data 1,1,3,3,3,3,3,1 Data 1,1,1,1,1,1,1,1
I'm not sure what that is? If you want to make a "load save" option in a game it's as simple as doing menu stuff and calling LOAD based on the menu option.