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

An Easy Proofread


Recommended Posts

Could some1 proofread this for me, it is when the Player logs in, it checks for what his speed is and changes his moving speed depending on the stat
```
If GetPlayerSPEED(Index) > 1999 Then
Call SetSpeed(Index, Walk, 6)
Call SetSpeed(Index, Run, 16)
End If
Exit Sub
If GetPlayerSpeed(Index) > 1499
Call SetSpeed(Index, Run, 12)
Call SetSpeed(Index, Walk, 5)
End If
Exit Sub
If GetPlayerSpeed(Index) > 999
Call SetSpeed(Index, Run, 10)
End If
Exit Sub
If GetPlayerSpeed(Index) > 499
Call SetSpeed(Index, Run, 9)
End If
Exit Sub

```
Link to comment
Share on other sites

```
If GetPlayerSPEED(Index) > 1999 Then
  Call SetSpeed(Index, Walk, 6)
  Call SetSpeed(Index, Run, 16)
  Exit Sub
  End If

  If GetPlayerSpeed(Index) > 1499 Then
  Call SetSpeed(Index, Run, 12)
  Call SetSpeed(Index, Walk, 5)
  Exit Sub
  End If

  If GetPlayerSpeed(Index) > 999 Then
  Call SetSpeed(Index, Run, 10)
  Exit Sub
  End If

  If GetPlayerSpeed(Index) > 499 Then
  Call SetSpeed(Index, Run, 9)
  Exit Sub
  End If

```
You forgot the **Then** on most Ifs.

EDIT: Also, put the Exit Subs INSIDE the Ifs, or it will exit after checking the top one.
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...