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

Saving every minute.


sir zach
 Share

Recommended Posts

I wrote this code that is suppose to be called every minute, or when Seconds = 0.

```
Sub Bathe()

TotalTime = GetVar("Accounts\" & GetPlayerLogin(index) & "\" & GetPlayerName(index) & ".ini", "Bathe", "Time")

If TotalTime = "" Then
Call PutVar("Accounts\" & GetPlayerLogin(index) & "\" & GetPlayerName(index) & ".ini", "Bathe", "Time", "1")
Else If
NewTotal = TotalTime + 1
Call PutVar("Accounts\" & GetPlayerLogin(index) & "\" & GetPlayerName(index) & ".ini", "Bathe", "Time", NewTotal)
End If

End Sub
```

But that code isn't working AND nothing will be called when Seconds = 0\. Here is my timed event sub:

```
Sub TimedEvent(Hours, Minutes, Seconds)
If Minutes = 0 Then
If Seconds = 0 Then
Call AdminMsg("Don't forget to vote for Eclipse.", YELLOW)
End If
End If

If Seconds = 0 Then
Call Bathe()
End If

End Sub
```

Side Note: I have tried to include the bathe sub from another file and inside the timed event sub.
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...