This is a bit further but I can not see why it is not working!
dim filename$(1000)
sync on
sync rate 30
make directory "c:\World Builder"
set dir "c:\World Builder"
if file exist ("level.mrnaughty")=1
open to read 10,"level.mrnaughty"
read file 10,total_object
for object=1 to 0+total_object
read string 10,filename$(object)
read float 10,tsox#
read float 10,tsoy#
read float 10,tsoz#
read float 11,xx#
read float 11,yy#
read float 11,zz#
load object filename$(object),object
position object object,tsox#,tsoy#,tsoz#
scale object object,xx#,yy#,zz#
next object
close file 10
endif
x#=400
y#=400
z#=400
make matrix 1,5000,5000,50,50
position matrix 1,0,-5,0
total_object = 0
make camera 1
do
set cursor 0,0
print "press n to make a new object(write what the object number should be)"
print "press s to write the object number you wanna select"
print "You can also press left mousebutton to select between objects"
print "Current object selected : "; obj_numb
if c#=0 then print "CAMERA MODE"
if c#=1 then print "Editing Mode"
if inkey$() = "n"
input filename$
input obj_numb
total_object = total_object+1
load object filename$,obj_numb
position object obj_numb,0,0,-30
position camera object position x(obj_numb), object position y(obj_numb)+5, object position z(obj_numb)-30
scale object obj_numb,x#,y#,z#
endif
if inkey$() = "p"
input obj_numb
endif
if inkey$()="c" then c#=0
if c#=0 then control camera using arrowkeys 1,1.5,1
if inkey$()="e" then c#=1
if upkey() = 1 and c#=1
move object obj_numb,0.5
endif
if downkey() = 1 and c#=1
move object obj_numb,-0.5
endif
if leftkey() = 1 and c#=1
turn object left obj_numb,2
endif
if rightkey() = 1 and c#=1
turn object right obj_numb,2
endif
if inkey$()="+" then x#=x#+10,y#=y#+20,z#=z#+10 : scale object obj_numb,x#,y#,z#
if inkey$()="-" then x#=x#-10,y#=y#-20,z#=z#-10 : scale object obj_numb,x#,y#,z#
if inkey$()="1" then move object up obj_numb,0.5
if inkey$()="2" then move object down obj_numb,0.5
if inkey$()="3" then roll object right obj_numb,0.5
if inkey$()="4" then roll object left obj_numb,0.5
if spacekey()=1 then gosub writedata
if mouseclick() = 1 and c#=1
obj_numb = obj_numb+1
if obj_numb > total_object
obj_numb = 1
endif
endif
sync
loop
writedata:
if total_object>0
delete file "level.mrnaughty"
open to write 10,"level.mrnaughty"
write file 10,total_object
for object=1 to 0+total_object
write string 10,filename$(object)
write float 10,object position x(object)
write float 10,object position y(object)
write float 10,object position z(object)
write float 10,x#
write float 10,y#
write float 10,z#
next object
endif
text 0,100,"Data saved"
sync
wait 1000
return
Btw saving works now it is loading which doesn't, please help