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

Scripts Not Working (SOLVED)


Kimimaru
 Share

Recommended Posts

Hello! I'm making two very simple scripted tiles, and I don't see why they're not working. I believe I have all of the commands right and everything. Here's my Scripted Tile Sub:

```
' Executes when a player steps onto a scripted tile.
Sub ScriptedTile(Index, Script)
Select Case Script

  ' Level Block Tile

Case 0
If GetPlayerLevel(index) < 50 Then
Call PlayerMsg(Index, "You must be at least level 50 to pass!", GREEN)
Call BlockPlayer(index)
End If
Exit Sub

' Reduce HP to 1 Tile

Case 1

  Call SetPlayerHP(Index, 1)
  Call SendStats(Index)

  ' Warps player and gives them an item Tile

Case 2

  Call setplayerinvitemnum(index, 20, 2)
  Call PlayerWarp(Index, 1, 5, 10)

Case Else

Call PlayerMsg(Index, "No tile script found. Please contact an admin to solve this problem.", WHITE)
Exit Sub
End Select
End Sub
```
My Case 0 script works perfectly fine. The odd thing is that after I add the Case 1 and Case 2 scripts, it stops working. Also, the Case 1 and Case 2 scripts aren't working, either. Any help would be appreciated.
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...