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

A slight problem


Wing
 Share

Recommended Posts

Actually its the gender based paper doll that's interfering.

I tried taking it away, and everything went fine. I added it again and the problem came back.

Its the client side interfering, not the server side.

In player rec I added
```
Sex as Byte
```
The mod database I added at bottom
```
Function GetPlayerSex(ByVal index As Long) As Byte
    If index > MAX_PLAYERS Then Exit Function
    GetPlayerSex = Player(index).Sex
End Function

Sub SetPlayerSex(ByVal index As Long, ByVal Sex As Byte)
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If index > MAX_PLAYERS Then Exit Sub
    Player(index).Sex = Sex

    Exit Sub
errorhandler:
    HandleError "SetPlayerSex", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

```
And in sub handleplayerdata
```
Call SetPlayerSex(i, Buffer.Readlong)
```
and replaced

```
Call BltPaperdoll(x, y, Item(GetPlayerEquipment(Index, PaperdollOrder(i))).Paperdoll, Anim, spritetop)
```
with

```
If GetPlayerSex(index) = 0 Then
                    Call BltPaperdoll(x, y, Item(GetPlayerEquipment(index, PaperdollOrder(i))).Paperdoll, Anim, spritetop)
                ElseIf GetPlayerSex(index) = 1 Then
                    Call BltPaperdoll(x, y, Item(GetPlayerEquipment(index, PaperdollOrder(i))).Paperdoll + 1, Anim, spritetop)
                End If
```
Link to comment
Share on other sites

@Soul:

> Make sure the server is actually sending the data to the client (see PlayerData in modServerTCP) and that the data is in the proper order on both sides.

I removed```
Buffer.WriteLong GetPlayerSex(index)
```from server
and```
Call SetPlayerSex(i, Buffer.Readlong)
```from client and It stops the 255 stat problem.

I put them both at the bottom so I don't understand.

Problem resolved. Sex was a byte, had to change long to byte.
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...