Jump to content

iniwrite does not write


Recommended Posts

Hi!

I really cant ficure what wrong. I am unable to write to ini file using iniwrite. Heres the code:

func B1()
$func1 = FileOpenDialog("Select new ad", @HomeDrive & "", "Videos (*.avi;*.mpg)", 1)
If @error Then
    MsgBox(4096, "", "Was not changed")
Else
Global $change1 = "1"
$func1 = StringReplace($func1, "|", @CRLF)
global $newad1 = "New selection: " & $func1
global $newadini1 = $func1
$Label1 = GUICtrlCreateLabel($newad1, 110, 55, 380, 17)

EndIf
EndFunc

func savesettings()
  
if $change1 = 1 then
   iniWrite(@ScriptDir & "settings.ini","ads","ad1",$newadini1)
   IniWrite(@ScriptDir & "settings.ini","tests","test1",$newadini1)
   MsgBox(1,$newadini1,$newadini1)
Else
EndIf

  
global $ad1chance = "0"
global $ad2chance = "0"
global $ad3chance = "0"
global $ad4chance = "0"
global $ad5chance = "0"
EndFunc

Any pointers?

EDIT: Unrelated code removed.

Edited by Karting
Link to post
Share on other sites

Maybe

@ScriptDir & "settings.ini"

should be

@ScriptDir & "settings.ini"

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to post
Share on other sites

Lol, finally you got it :-)

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...