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

Got a little question about a scripted item(Solved)


azure
 Share

Recommended Posts

So I'm making a scripted item, when you use the item it adds to a variable in an ini in the accounts folder. The problem is at the end. It needs to get the variable to add to it, I think, but it won't seem to work. If someone could help me make this work i'd appreciate it.

Here's the code

```
Case 1
                        Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "badgelevel",GetVar("accounts\GetPlayerLogin(Index) & ".ini","CHAR" & GetPlayerCharNum(Index),"badgelevel")+1)
                        Call TakeItem(index,4,0)                     
                        Exit Sub
```
Link to comment
Share on other sites

```
Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "badgelevel", GetVar("accounts\" & GetPlayerLogin(Index) & ".ini", "CHAR" & GetPlayerCharNum(Index), "badgelevel") + 1)
```
Link to comment
Share on other sites

would you like to know where you errored? Too bad, i'm telling you anyways
it was in your getvar statement```
GetVar("accounts\GetPlayerLogin(Index) & ".ini","CHAR" & GetPlayerCharNum(Index),"badgelevel")+1)
```Specifically,```
"Accounts\GetPlayerLogin(Index) & ".ini"
```It's supposed to be:```
"Accounts\" & GetPlayerLogin(Index) & ".ini"
```
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...