I’m looking for some help implementing a new editor into an engine (using Eclipse Worlds 1.1.7, but that should matter).
Essentially what I’m doing is trying to copy the spell editor to make a talent editor (once I get the editor working, I’ll adjust the system). My problem is it crashes when it saves, so I’m just wondering if someone can explain where exactly something in the spell system is being pulled from.
This is the particular sub in question. What happens is when I run my talent editor, it pops up with the basic editor (only have name, icon and a lstIndex on the form right now) . When I make the edit and save, the client closes down, no error, just exits. In the staff log’s it shows that a talent was edited, though when I load it doesn’t show any information on the talent screen (though that could just be my loading isn’t correct). Can someone explain to me where the information for this line comes from exactly?
Public Sub SendSaveSpell(ByVal SpellNum As Long) Dim buffer As clsBuffer Dim SpellSize As Long Dim SpellData() As Byte ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set buffer = New clsBuffer SpellSize = LenB(Spell(SpellNum)) ReDim SpellData(SpellSize - 1) CopyMemory SpellData(0), ByVal VarPtr(Spell(SpellNum)), SpellSize buffer.WriteLong CSaveSpell buffer.WriteLong SpellNum buffer.WriteBytes SpellData SendData buffer.ToArray() Set buffer = Nothing Exit Sub ' Error handler errorhandler: HandleError "SendSaveSpell", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear End Sub