@name Data save test
@inputs 
@outputs Table:table Array:array Array2:array Table2:table Number 
@outputs String:string Vector:vector Pos:vector WPos:vector Dump2:array
@persist 
@trigger 
runOnFile(1)
Table=table()
Own=entity():owner()
Pos=Own:pos()
WPos=Own:weapon():pos()

Table["A",string]=Own:name()
Table["B",entity]=Own
Table["C",vector]=Pos
Table["D",angle]=Own:angles()
Table["E",number]=Own:id()
Array=array()
C=1
#Array:pushEntity(Own:weapon())
Array:pushString(Own:steamID())
Array:pushVector(WPos)
Array:pushAngle(Own:weapon():angles())
Array:pushNumber(Own:health())


S1=";"
S2=" \ "
S=S1+S2
ArrayS=glonEncode(Array)
TableS=glonEncode(Table)
Data=ArrayS+S+TableS+S+123+S+"wally"+S+toString(Own:pos())
#Data="Honestly does this even work?"+S+ArrayS
File="datatest.txt"
fileWrite(File,Data)
fileLoad(File)

if(first()){timer("delay",10010)}

if(clk("delay")){
    Test=fileRead(File)
    Dump=Test:explode(S)
    #this recovers an array
    Array2=glonDecode(Dump:string(1))
    #this recovers a table
    Table2=glonDecodeTable(Dump[2,string]:replace(S2,""))
    #this recovers a number
    Number=Dump:string(3):toNumber()
    #this recovers a string
    String=Dump:string(4):replace(S2,"")
    #this recovers a vector
    Dump2=Dump:string(5):explode(",")
    DumpX=Dump2[1,string]:replace(S2+"[",""):toNumber()
    DumpZ=Dump2[3,string]:replace("]",""):toNumber()
    Vector=vec(DumpX,Dump2:string(2):toNumber(),DumpZ)
    }
