Mirage Source http://miragesource.net/forums/ |
|
Small Issue with Spells http://miragesource.net/forums/viewtopic.php?f=193&t=5308 |
Page 1 of 1 |
Author: | Jared [ Tue Mar 24, 2009 9:13 am ] |
Post subject: | Small Issue with Spells |
Well for some odd reason when i go into the /editspell menu and choose "say number 4" it crashes. now in VB6 it did the same but took me to the code Code: frmSpellEditor.scrlFrame.Max = (DDS_Spell(scrlFrame.Value).SurfDescription.lWidth \ SIZE_X) - 1 im not exactly sure what to do, any help would be much appreciated. |
Author: | Matt [ Tue Mar 24, 2009 12:58 pm ] |
Post subject: | Re: Small Issue with Spells |
Jared wrote: Well for some odd reason when i go into the /editspell menu and choose "say number 4" it crashes. now in VB6 it did the same but took me to the code Code: frmSpellEditor.scrlFrame.Max = (DDS_Spell(scrlFrame.Value).SurfDescription.lWidth \ SIZE_X) - 1 im not exactly sure what to do, any help would be much appreciated. The exact error code would help a lot. |
Author: | Jared [ Tue Mar 24, 2009 3:53 pm ] |
Post subject: | Re: Small Issue with Spells |
Code: "Runtime error 9 - Subscript 9 out of range thats the general error i get when trying to edit a spell or make a new one. That is the exact error code... was the only thing i got.. |
Author: | Matt [ Tue Mar 24, 2009 4:18 pm ] |
Post subject: | Re: Small Issue with Spells |
This is my sub: Code: Public Sub SpellEditorBltSpell() Dim SpellNum As Long Dim sRECT As DxVBLib.RECT Dim dRECT As DxVBLib.RECT SpellNum = frmSpellEditor.scrlPic.Value If SpellNum < 1 Or SpellNum > NumSpells Then frmSpellEditor.picPic.Cls Exit Sub End If SpellTimer(SpellNum) = GetTickCount + SurfaceTimerMax If DDS_Spell(SpellNum) Is Nothing Then Call InitDDSurf("spells\" & SpellNum, DDSD_Spell(SpellNum), DDS_Spell(SpellNum)) End If frmSpellEditor.scrlFrame.Max = (DDSD_Spell(SpellNum).lWidth \ SIZE_X) - 1 sRECT.Top = 0 sRECT.Bottom = SIZE_Y sRECT.Left = frmSpellEditor.scrlFrame.Value * SIZE_X sRECT.Right = sRECT.Left + SIZE_X dRECT.Top = 0 dRECT.Bottom = SIZE_Y dRECT.Left = 0 dRECT.Right = SIZE_X Call Engine_BltToDC(DDS_Spell(SpellNum), sRECT, dRECT, frmSpellEditor.picPic) End Sub Compare them. |
Author: | Jared [ Tue Mar 24, 2009 6:50 pm ] |
Post subject: | Re: Small Issue with Spells |
this is client side btw. Code: Private Sub scrlFrame_Change() lblFrameNum.Caption = scrlFrame.Value Call SpellEditorBltSpell frmSpellEditor.scrlFrame.Max = (DDS_Spell(scrlFrame.Value).SurfDescription.lWidth \ SIZE_X) - 1 End Sub lol.. i didnt know witch one you were talking about so. Code: Public Sub SpellEditorBltSpell()
Dim SpellPic As Long Dim sRECT As DXVBLib.RECT Dim dRECT As DXVBLib.RECT SpellPic = frmSpellEditor.scrlPic.Value If SpellPic < 1 Or SpellPic > NumSpells Then frmSpellEditor.picPic.Cls Exit Sub End If Call DD_ReadySurface("spells\" & SpellPic, DDS_Spell(SpellPic)) sRECT.Top = 0 sRECT.Bottom = SIZE_Y sRECT.Left = frmSpellEditor.scrlFrame.Value * SIZE_X sRECT.Right = sRECT.Left + SIZE_X dRECT.Top = 0 dRECT.Bottom = SIZE_Y dRECT.Left = 0 dRECT.Right = SIZE_X Call DD_BltToDC(DDS_Spell(SpellPic).Surface, sRECT, dRECT, frmSpellEditor.picPic) End Sub |
Author: | Matt [ Tue Mar 24, 2009 9:11 pm ] |
Post subject: | Re: Small Issue with Spells |
Jared wrote: this is client side btw. Code: Private Sub scrlFrame_Change() lblFrameNum.Caption = scrlFrame.Value Call SpellEditorBltSpell frmSpellEditor.scrlFrame.Max = (DDS_Spell(scrlFrame.Value).SurfDescription.lWidth \ SIZE_X) - 1 End Sub lol.. i didnt know witch one you were talking about so. Code: Public Sub SpellEditorBltSpell() Dim SpellPic As Long Dim sRECT As DXVBLib.RECT Dim dRECT As DXVBLib.RECT SpellPic = frmSpellEditor.scrlPic.Value If SpellPic < 1 Or SpellPic > NumSpells Then frmSpellEditor.picPic.Cls Exit Sub End If Call DD_ReadySurface("spells\" & SpellPic, DDS_Spell(SpellPic)) sRECT.Top = 0 sRECT.Bottom = SIZE_Y sRECT.Left = frmSpellEditor.scrlFrame.Value * SIZE_X sRECT.Right = sRECT.Left + SIZE_X dRECT.Top = 0 dRECT.Bottom = SIZE_Y dRECT.Left = 0 dRECT.Right = SIZE_X Call DD_BltToDC(DDS_Spell(SpellPic).Surface, sRECT, dRECT, frmSpellEditor.picPic) End Sub Well, tbh, I meant take your code and then take my code. Compare them and find out what was different. Mine works fine. |
Author: | Jared [ Tue Mar 24, 2009 9:28 pm ] |
Post subject: | Re: Small Issue with Spells |
Well it did not work on mine, and also, just to see if anything i added was messing it up i downloaded a fresh version of MS4 and still the same exact issue without any editing. Strange eh? Lol also im quiet new at this so, im still learning. |
Author: | Vahz [ Sun Mar 29, 2009 1:14 pm ] |
Post subject: | Re: Small Issue with Spells |
change the Code: frmSpellEditor.scrlFrame.Max = (DDS_Spell(scrlFrame.Value).SurfDescription.lWidth \ SIZE_X) - 1 with this Code: frmSpellEditor.scrlFrame.Max = (DDS_Spell(scrlPic.Value).SurfDescription.lWidth \ SIZE_X) - 1 in case u didnt notice, i replaced scrlFrame.value with scrlPic.value |
Author: | Jared [ Sun Mar 29, 2009 4:53 pm ] |
Post subject: | Re: Small Issue with Spells |
lol that just caused more errors. thank you though. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |