(AGK version: 108.13)
Submitted: 2013-06-17 12:46:39
function LevelLoad(filename$)

 //message("Load")

 ret=0

 if GetFileExists( filename$ ) =0
    message("file "+filename$+" not found")
    exitfunction ret
 endif

 file = OpenToRead(filename$)

 r$=Readline(file) //Info
 //message(r$)

 Level.color=readInteger( file )
 Level.style=readInteger( file )

 //Hole x,y
 count=readInteger(file)
 Level.holes=0
 for i=1 to count
     x#=readFloat(file)
     y#=readFloat(file)
     MakeHole(x#,y#,Level.imghole)
 next

 //Start x,y
 x#=readFloat(file)
 y#=readFloat(file)
 MakeStart(x#,y#,Level.imgstartpoint)

 //Ende x,y
 x#=readFloat(file)
 y#=readFloat(file)
 MakeGoal(x#,y#,Level.imggoalpoint)

 //Block x,y,a
 count=readInteger(file)
 Level.blocks=0
 for i=1 to count
     x#=readFloat(file)
     y#=readFloat(file)
     a#=readFloat(file)
     MakeBlock(x#,y#,a#,Level.imgblock)
 next

 //Pin x,y,a
 count=readInteger(file)
 Level.pins=0
 for i=1 to count
     x#=readFloat(file)
     y#=readFloat(file)
     a#=readFloat(file)
     MakePin(x#,y#,a#,Level.imgpin)
 next

 //Wall x,y,a
 count=readInteger(file)
 Level.walls=0
 for i=1 to count
     x#=readFloat(file)
     y#=readFloat(file)
     a#=readFloat(file)
     MakeWall(x#,y#,a#,Level.imgwall)
 next

 //Way x,y,a
 count=readInteger(file)
 Level.waypoints=0
 for i=1 to count
     x#=readFloat(file)
     y#=readFloat(file)
     a#=readFloat(file)
     MakeWayPoint(x#,y#,a#,Level.imgway)
 next

 CloseFile ( file )

 MakeBackgroundSprite()

 MakeBall(Level.imgball)

 LevelColorize()

 ret=1

endfunction ret
(AGK version: 108.13)
Submitted: 2013-06-17 13:15:01
function ConfigSave()

    File$="config11.txt"

    f=OpenTowrite(File$,0)

    if f

        WriteString ( f, Config.FileVersion$ )
        WriteString ( f, Config.PlayerName$  )
        WriteString ( f, Config.NetworkName$ )
        WriteString ( f, Config.ServerIP$    )
        Writeinteger( f, Config.ServerPort   )
        Writeinteger( f, Config.BackgroundColor)
        Writeinteger( f, Config.BackgroundMaterial)
        Writeinteger( f, Config.Board)
        Writeinteger( f, Config.Notation)
        Writeinteger( f, Config.GridSnap)

        closefile(f)

    endif

endfunction

function ConfigLoad()

    File$="config11.txt"

    if GetFileExists( File$ ) =0 then exitfunction

    f=OpenToRead(File$)

    if f

        Config.FileVersion$=readString (f)
        Config.PlayerName$ =readString (f)
        Config.NetworkName$=readString (f)
        Config.ServerIP$   =readString (f)
        Config.ServerPort  =readinteger(f)
        Config.BackgroundColor=readinteger(f)
        Config.BackgroundMaterial=readinteger(f)
        Config.Board=readinteger(f)
        Config.Notation=readinteger(f)
        Config.GridSnap=readinteger(f)

        closefile(f)

    endif

endfunction
(AGK version: 2)
Submitted: 2015-12-02 13:18:24
flow/hint for understanding at pc
situation:
a template file exist at sub folder in your agk project\
media\test.txt
here is no test.txt
C:\Users\Name\AppData\Local\AGKApps\project\media\

load "test.txt" will load media\test.txt
save "test.txt" will save in C:\Users\Name\AppData\Local\AGKApps\project\media\test.txt
load "test.txt" will load from C:\Users\Name\AppData\Local\AGKApps\project\media\test.txt

Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.