Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

WTF is wrong?


Lenton
 Share

Recommended Posts

```
Function ReadINI(INISection As String, INIKey As String, INIFile As String)
```

Here's a random example found in the project that worked:
```
ReadINI("CONFIG", "Music", App.Path & "\config.ini")
```
EDIT: Also it was a runtime error "13" (type mismatch)
Link to comment
Share on other sites

@Lenton:

> Ok, I dimmed it as a "string" and took away the "+ 1". It worked fine…
>
> I need to add 1 to it but how??

so you mean it worked to get the data out of the ini?
and you saved it into and integer or a long?

if so, do this

…gettting the VARIABLE...
VARIABLE = VARIABLE + 1

thats all :p
Link to comment
Share on other sites

Dim UpdateNumber as Integer
UpdateNumber = Val(ReadINI("CONFIG", "Update", App.Path & "/config")) + 1

Learn about your types.
Integer is a number, ReadINI returns a string. You can't add a string to a number it's like trying to add a and 1 togeather.
Val() turns a string into a number.
Link to comment
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
 Share

×
×
  • Create New...