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

Fix potion please


adamsharp
 Share

Recommended Posts

nothing is happening at all
also

what is wrong with this?
```
' Executes every second, based on the server time.
Sub TimedEvent(Hours, Minutes, Seconds)
If Minutes = 0 Then
If Seconds = 0 Then
Call AdminMsg("Don't Forget To Read The News At Tlomaw.com", YELLOW)
Call AdminMsg("Look Its The Start Of A New Hour Here Have 25 Gold!", 10)
Call GiveCurrency(Index, 1, 25)
End If
End If
End Sub

```thank you
Regards,
Adamsharp.
Link to comment
Share on other sites

@adamsharp:

> nothing is happening at all
> also
>
> what is wrong with this?
> ```
> ' Executes every second, based on the server time.
> Sub TimedEvent(Hours, Minutes, Seconds)
> If Minutes = 0 Then
> If Seconds = 0 Then
> Call AdminMsg("Don't Forget To Read The News At Tlomaw.com", YELLOW)
> Call AdminMsg("Look Its The Start Of A New Hour Here Have 25 Gold!", 10)
> Call GiveCurrency(Index, 1, 25)
> End If
> End If
> End Sub
>
> ```thank you
> Regards,
> Adamsharp.

Couple things wrong with that. One, AdminMsgs aren't shown to players. I don't know if you were trying to send these to players, but you'd need GlobalMsgs for that. Second, "index" is not defined in that sub, so you can't give currency to player "index". You'd have to do something like:

```
For index = 1 to MAX_PLAYERS
    If IsPlaying(index) Then
        Call GiveCurrency(Index, 1, 25)
    End If
Next
```
As for the potion, that definitely means your main.txt is bugged. Either turn on ScriptErrors in the data.ini file and restart the server, then fix the errors that it finds, or post your main.txt so someone else can check into it.
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...