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

NEED HELP!


Peter120
 Share

Recommended Posts

I'm using Alatar's quest system and when I wrote /editquest I got an error from server subscript out of range 9\. I checked the tutorial and my suorce and there is no difference. I tired to delete quest files, but still not work. Help!
Link to comment
Share on other sites

I get

(In Class Modules –> clsBuffer)

Public Sub WriteBytes(ByRef nByte() As Byte)
Dim nLength As Long

    **nLength = (UBound(nByte) - LBound(nByte)) + 1**

    If WriteHead + nLength - 1 > BufferSize Then Allocate nLength

    CopyMemory Buffer(WriteHead), nByte(0), nLength
    WriteHead = WriteHead + nLength
End Sub

I don't have backup :S
Link to comment
Share on other sites

In modEnumerations client side, your ClientPackets should match modEnumerations ClientPackets server side (the comments don't matter though).

So client-side take find this (modEnumerations > Enum ClientPackets):
```
    CSaveDoor
    CRequestDoors
    CRequestEditDoors

```
and move it up before:
```
'ALATAR

```

* * *

End result:
```
' Packets sent by client to server
Public Enum ClientPackets
    CNewAccount = 1
    CDelAccount
    CLogin
    CAddChar
    CUseChar
    CSayMsg
    CEmoteMsg
    CBroadcastMsg
    CPlayerMsg
    CPlayerMove
    CPlayerDir
    CUseItem
    CAttack
    CUseStatPoint
    CPlayerInfoRequest
    CWarpMeTo
    CWarpToMe
    CWarpTo
    CSetSprite
    CGetStats
    CRequestNewMap
    CMapData
    CNeedMap
    CMapGetItem
    CMapDropItem
    CMapRespawn
    CMapReport
    CKickPlayer
    CBanList
    CBanDestroy
    CBanPlayer
    CRequestEditMap
    CRequestEditItem
    CSaveItem
    CRequestEditNpc
    CSaveNpc
    CRequestEditShop
    CSaveShop
    CRequestEditSpell
    CSaveSpell
    CSetAccess
    CWhosOnline
    CSetMotd
    CSearch
    CSpells
    CCast
    CQuit
    CSwapInvSlots
    CRequestEditResource
    CSaveResource
    CCheckPing
    CUnequip
    CRequestPlayerData
    CRequestItems
    CRequestNPCS
    CRequestResources
    CSpawnItem
    CRequestEditAnimation
    CSaveAnimation
    CRequestAnimations
    CRequestSpells
    CRequestShops
    CRequestLevelUp
    CForgetSpell
    CCloseShop
    CBuyItem
    CSellItem
    CChangeBankSlots
    CDepositItem
    CWithdrawItem
    CCloseBank
    CAdminWarp
    CTradeRequest
    CAcceptTrade
    CDeclineTrade
    CTradeItem
    CUntradeItem
    CHotbarChange
    CHotbarUse
    CSwapSpellSlots
    CAcceptTradeRequest
    CDeclineTradeRequest
    CPartyRequest
    CAcceptParty
    CDeclineParty
    CPartyLeave
    CSaveDoor
    CRequestDoors
    CRequestEditDoors
    'ALATAR
    CRequestEditQuest
    CSaveQuest
    CRequestQuests
    CPlayerHandleQuest
    CQuestLogUpdate
    '/ALATAR
    CProjecTileAttack
    ' Make sure CMSG_COUNT is below everything else
    CMSG_COUNT
End Enum

```
Link to comment
Share on other sites

@Peter120:

> And also Advanced doors, keys, and switches are working too now XD, thanks again

Yep. When you send a packet (say CLogin) it actually sends a number (in this case, 3, because it is the third packet in the enumeration). If CLogin was 2, but 3 server-side, the server would read 2, and instead activate the code for CDelAccount (which is packet #2 server-side). This would delete the player's account instead of logging in! You're lucky it gave an error to let you know something was wrong. :)
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...