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

[EO] Weapon Proficiencies/Skill Level


DJMaxus
 Share

Recommended Posts

i tried again with this but it highlights .cloth and says subscript out of range.

```
Function SetPlayerSkill(ByVal Index As Long, ByVal SkillNum As Long, zx)
    ' If debug mode, handle error then exit out
    'If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function

        Select Case SkillNum
        Case 1
            zx = Player(Index).Cloth
        Case 2
            zx = Player(Index).Leather
        Case 3
            zx = Player(Index).Plate
        Case 4
            zx = Player(Index).Dagger
        Case 5
            zx = Player(Index).OneSword
        Case 6
            zx = Player(Index).TwoSword
        Case 7
            zx = Player(Index).OneAxe
        Case 8
            zx = Player(Index).TwoAxe
        Case 9
            zx = Player(Index).Wand
        Case 10
            zx = Player(Index).Staff
        Case 11
            zx = Player(Index).Shortbow
        Case 12
            zx = Player(Index).Crossbow
        Case 13
            zx = Player(Index).Shield
        Case 14
            zx = Player(Index).Polearm
        End Select

    ' Error handler
    Exit Function
errorhandler:
    HandleError "SetPlayerSkill", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function

```
can anyone help me?
Link to comment
Share on other sites

  • Replies 67
  • Created
  • Last Reply

Top Posters In This Topic

Try this

```
Function SetPlayerSkill(ByVal Index As Long, ByVal SkillNum As Long, Byval zx as Long)
    ' If debug mode, handle error then exit out
    'If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function

        Select Case SkillNum
        Case 1
            zx = Player(Index).Cloth
        Case 2
            zx = Player(Index).Leather
        Case 3
            zx = Player(Index).Plate
        Case 4
            zx = Player(Index).Dagger
        Case 5
            zx = Player(Index).OneSword
        Case 6
            zx = Player(Index).TwoSword
        Case 7
            zx = Player(Index).OneAxe
        Case 8
            zx = Player(Index).TwoAxe
        Case 9
            zx = Player(Index).Wand
        Case 10
            zx = Player(Index).Staff
        Case 11
            zx = Player(Index).Shortbow
        Case 12
            zx = Player(Index).Crossbow
        Case 13
            zx = Player(Index).Shield
        Case 14
            zx = Player(Index).Polearm
        End Select

    ' Error handler
    Exit Function
errorhandler:
    HandleError "SetPlayerSkill", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function
```
Or This

```
Function SetPlayerSkill(ByVal Index As Long, ByVal SkillNum As Long)
Dim ZX as long
    ' If debug mode, handle error then exit out
    'If Options.Debug = 1 Then On Error GoTo errorhandler

    If Index > MAX_PLAYERS Then Exit Function

        Select Case SkillNum
        Case 1
            zx = Player(Index).Cloth
        Case 2
            zx = Player(Index).Leather
        Case 3
            zx = Player(Index).Plate
        Case 4
            zx = Player(Index).Dagger
        Case 5
            zx = Player(Index).OneSword
        Case 6
            zx = Player(Index).TwoSword
        Case 7
            zx = Player(Index).OneAxe
        Case 8
            zx = Player(Index).TwoAxe
        Case 9
            zx = Player(Index).Wand
        Case 10
            zx = Player(Index).Staff
        Case 11
            zx = Player(Index).Shortbow
        Case 12
            zx = Player(Index).Crossbow
        Case 13
            zx = Player(Index).Shield
        Case 14
            zx = Player(Index).Polearm
        End Select

    ' Error handler
    Exit Function
errorhandler:
    HandleError "SetPlayerSkill", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Function
End Function
```
Link to comment
Share on other sites

@ daxterxx :  what i am trying to do here is to have a function that can be used for all the proficiency instead of having a function for each proficiency.

@general pony : i found out that i had a error due to me not editing setplayerskill client side.  thank you anyway :D
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 4 weeks later...
  • 2 weeks later...
That's because Eclipse Advanced has this in a seperate project, not the default client.(Although, I think this is a silly idea because you need to edit TWO binaries rather than one when you add new features. But alas.) Look for something refered to as the Editor/Developper Suite.
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 years later...

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...