Probleme mit INI

  • Ich abu gerade an einem Prog das eine Datenbank in einer INI Datei erstellt, und dann man soll eben Einträge dazufügen und auch Löschen können. Im Vorhinein weis ich aber nciht wie viele Werte es werden

    Bin jetzt gerade bei der Funktion mit der man ein neues key(value paar hinzufügen soll zu eine Sektion. Das Problem ist dass ich jedes mal ein @error bekomme:

    [autoit]


    $database=@scriptdir &"\database.ini"
    #include <Array.au3>

    [/autoit][autoit][/autoit][autoit]

    global $inisection_read[2000][3]
    global $inisection_write[2000][2]
    global $a[10]

    [/autoit][autoit][/autoit][autoit]

    func _eintrag_erstellen()
    msgbox(1,"",@scriptdir)
    $a=inireadsectionnames($database)
    if $a >=0 then
    $inisection_read=inireadsection($database,stringupper(guictrlread($farbe_new))) ;$farbe_new=sektionsname
    if @error then msgbox(1,"",)
    $inisection_write=_arrayadd($inisection_read,$name_new & "/:"& $edition_new &"/:/"& $besitzer_new)
    inidelete($database,stringupper(guictrlread($farbe_new)))
    iniwritesection($database,stringupper(guictrlread($farbe_new)),$inisection_write)
    endif
    endfunc

    [/autoit]


    (hab jetzt mal die GUI nicht rein geschrieben, die funktioniert ja.

    Mfg!

    Computers are like Airconditioning. They don´t work with open Windows.

  • OK erstmal danke, werd ich gleich Umbauen. Hab das Problem aber schon bei Inireadsection. Komm nicht dahinter was da nicht stimmt

    Computers are like Airconditioning. They don´t work with open Windows.