augusto95 Posted January 13, 2013 Author Share Posted January 13, 2013 Hi guys, well, I put some systems to my EO 2.3 and now the cmbType of Spell Editor is not saving anymore :xI don't know what I did wrong, but it happened after I added Projectile Spell's System… Help me.. again..! Link to comment Share on other sites More sharing options...
Matt Posted January 13, 2013 Share Posted January 13, 2013 Show us your cmb's code and your spellInit code. Link to comment Share on other sites More sharing options...
Wortel Angels Posted January 13, 2013 Share Posted January 13, 2013 If you ripped it from my version then i think you forgot something :-) Most the ITEM_TYPE or something at the ItemRec but that would give you an error xD Link to comment Share on other sites More sharing options...
augusto95 Posted January 13, 2013 Author Share Posted January 13, 2013 Matthew, this is my cmbType code:>! ```>! Private Sub cmbType_Click()>! If cmbType.text = "Linear" Then>! scrlRange.Value = 0>! chkAOE.Value = 1>! End If>! If (cmbType.ListIndex = SPELL_TYPE_PROJECTILE) Then>! Frame4.Visible = True>! Else>! Frame4.Visible = False>! End If>! ' If debug mode, handle error then exit out>! If Options.Debug = 1 Then On Error GoTo errorhandler>! If EditorIndex = 0 Or EditorIndex > MAX_SPELLS Then Exit Sub>! Item(EditorIndex).Type = cmbType.ListIndex>! ' Error handler>! Exit Sub>! errorhandler:>! HandleError "cmbType_Click", "frmEditor_Spell", Err.Number, Err.Description, Err.Source, Err.HelpContext>! Err.Clear>! Exit Sub>! End Sub>! ```and this is my SpellEditorInit (don't know if it is what you're asking)>! ```>! ' //////////////////>! ' // Spell Editor //>! ' //////////////////>! Public Sub SpellEditorInit()>! Dim i As Long>! Dim SoundSet As Boolean>! ' If debug mode, handle error then exit out>! If Options.Debug = 1 Then On Error GoTo errorhandler>! If frmEditor_Spell.Visible = False Then Exit Sub>! EditorIndex = frmEditor_Spell.lstIndex.ListIndex + 1>! ' populate the cache if we need to>! If Not hasPopulated Then>! PopulateLists>! End If>! ' add the array to the combo>! frmEditor_Spell.cmbSound.Clear>! frmEditor_Spell.cmbSound.AddItem "None.">! For i = 1 To UBound(soundCache)>! frmEditor_Spell.cmbSound.AddItem soundCache(i)>! Next>! ' finished populating>! With frmEditor_Spell>! ' set max values>! .scrlAnimCast.Max = MAX_ANIMATIONS>! .scrlAnim.Max = MAX_ANIMATIONS>! .scrlAOE.Max = MAX_BYTE>! .scrlRange.Max = MAX_BYTE>! .scrlMap.Max = MAX_MAPS>! >! ' build class combo>! .cmbClass.AddItem "None">! .cmbClass.Clear>! For i = 1 To Max_Classes>! .cmbClass.AddItem Trim$(Class(i).Name)>! Next>! >! If Spell(EditorIndex).ClassReq > -1 And Spell(EditorIndex).ClassReq <= Max_Classes Then>! .cmbClass.ListIndex = Spell(EditorIndex).ClassReq>! End If>! >! ' set values>! .txtName.text = Trim$(Spell(EditorIndex).Name)>! .txtDesc.text = Trim$(Spell(EditorIndex).Desc)>! .cmbType.ListIndex = Spell(EditorIndex).Type>! .scrlMP.Value = Spell(EditorIndex).MPCost>! .scrlLevel.Value = Spell(EditorIndex).LevelReq>! .scrlAccess.Value = Spell(EditorIndex).AccessReq>! .cmbClass.ListIndex = Spell(EditorIndex).ClassReq>! .scrlCast.Value = Spell(EditorIndex).CastTime>! .scrlCool.Value = Spell(EditorIndex).CDTime>! .scrlIcon.Value = Spell(EditorIndex).Icon>! .scrlMap.Value = Spell(EditorIndex).Map>! .scrlX.Value = Spell(EditorIndex).x>! .scrlY.Value = Spell(EditorIndex).y>! .scrlDir.Value = Spell(EditorIndex).Dir>! .scrlVital.Value = Spell(EditorIndex).Vital>! .scrlDuration.Value = Spell(EditorIndex).Duration>! .scrlInterval.Value = Spell(EditorIndex).Interval>! If Spell(EditorIndex).IsAoE Then>! .chkAOE.Value = 1>! Else>! .chkAOE.Value = 0>! End If>! .scrlAOE.Value = Spell(EditorIndex).AoE>! .scrlAnimCast.Value = Spell(EditorIndex).CastAnim>! .scrlAnim.Value = Spell(EditorIndex).SpellAnim>! .scrlStun.Value = Spell(EditorIndex).StunDuration>! .scrlBaseStat.Value = Spell(EditorIndex).BaseStat>! >! >! If frmEditor_Spell.cmbType.ListIndex = SPELL_TYPE_PROJECTILE Then>! frmEditor_Spell.Frame4.Visible = True>! With Spell(EditorIndex).ProjecTile>! frmEditor_Spell.scrlProjectileDamage.Value = .Damage>! frmEditor_Spell.scrlProjectilePic.Value = .Pic>! frmEditor_Spell.scrlProjectileRange.Value = .Range>! frmEditor_Spell.scrlProjectileSpeed.Value = .Speed>! End With>! End If>! >! ' find the sound we have set>! If .cmbSound.ListCount >= 0 Then>! For i = 0 To .cmbSound.ListCount>! If .cmbSound.List(i) = Trim$(Spell(EditorIndex).Sound) Then>! .cmbSound.ListIndex = i>! SoundSet = True>! End If>! Next>! If Not SoundSet Or .cmbSound.ListIndex = -1 Then .cmbSound.ListIndex = 0>! End If>! End With>! EditorSpell_BltIcon>! Spell_Changed(EditorIndex) = True>! ' Error handler>! Exit Sub>! errorhandler:>! HandleError "SpellEditorInit", "modGameEditors", Err.Number, Err.Description, Err.Source, Err.HelpContext>! Err.Clear>! Exit Sub>! End Sub>! ```Mortal Angels, this is my old EO, that you send me as "fix", I'm trying to really fix it! ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Just to learn more… Link to comment Share on other sites More sharing options...
Wortel Angels Posted January 13, 2013 Share Posted January 13, 2013 Aaah xDYeah that >.< i was trying it again but it wont work xD Link to comment Share on other sites More sharing options...
augusto95 Posted January 14, 2013 Author Share Posted January 14, 2013 ehehhe it's hard!but I think that if I save the spell it will work… so... Any help? Mortal or Matthew... Link to comment Share on other sites More sharing options...
Matt Posted January 14, 2013 Share Posted January 14, 2013 try changing```If frmEditor_Spell.cmbType.ListIndex = SPELL_TYPE_PROJECTILE Then```to```if Spell(EditorIndex).Type = SPELL_TYPE_PROJECTILE Then``` Link to comment Share on other sites More sharing options...
augusto95 Posted January 14, 2013 Author Share Posted January 14, 2013 Nothing has changed …For example, if I choose the cmbType "Heal HP" and edit all the spell and click "Save", everything that I edited continues, but the cmbType changes to the first option: "HP Damage" Link to comment Share on other sites More sharing options...
Matt Posted January 14, 2013 Share Posted January 14, 2013 _**Item**_(EditorIndex).Type = cmbType.ListIndexFound your issue. Link to comment Share on other sites More sharing options...
augusto95 Posted January 14, 2013 Author Share Posted January 14, 2013 Oh God!! ![<_<](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/dry.png)Can't believe that I didn't saw this before… oh f*ck, what a waste of time...Thx a lot bro! ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Link to comment Share on other sites More sharing options...
Matt Posted January 14, 2013 Share Posted January 14, 2013 No problem ^.^ It happens. Link to comment Share on other sites More sharing options...
Wortel Angels Posted January 14, 2013 Share Posted January 14, 2013 Now working or not ? xD Link to comment Share on other sites More sharing options...
augusto95 Posted January 14, 2013 Author Share Posted January 14, 2013 It's saving! But not working… ![<_<](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/dry.png)But this is my fault... The spell isn't doing anything... Link to comment Share on other sites More sharing options...
Matt Posted January 14, 2013 Share Posted January 14, 2013 He still is having problems with the system. I won't have a lot of time this week to look into it, so could you take care of it Mortal? Link to comment Share on other sites More sharing options...
augusto95 Posted January 14, 2013 Author Share Posted January 14, 2013 Actually Mortal already tried to do it with me some days ago, and we didn't get it Link to comment Share on other sites More sharing options...
Matt Posted January 14, 2013 Share Posted January 14, 2013 What exactly was the issue? It would help me out greatly if I knew. Link to comment Share on other sites More sharing options...
augusto95 Posted January 14, 2013 Author Share Posted January 14, 2013 Well, at the editor spell it's everything fine, when I put the type Projectile the frame with details appear normally… I edit them and save...But when I use the spell, nothing happens x( Link to comment Share on other sites More sharing options...
Whitepinkbun Posted January 15, 2013 Share Posted January 15, 2013 It might not be changing because when you change a spell it's not changing Spell_Changed(EditorIndex) = True make sure it's not doing something like thisWith Spell(EditorIndex)' loop for statsFor i = 1 To Stats.Stat_Count - 1frmEditor_Spell.scrlStatBonus(i).Value = .Stat_Req(i)NextEnd WithYou see if you have this in there and you dont have 1 To Stats.Stat_Count - 1 of frmEditor_Spell.scrlStatBonus then it wont recognize it as changed….If I just lost you then do the following (place the little red dot)![](http://i45.tinypic.com/8wecer.png)Now run the game and try editing a spell and when you change your spell selection if it doesn't pause the game and jump to this it means the sub is exiting out before it can tell the program that the spell has been changed!For instance perhaps withIf frmEditor_Spell.cmbType.ListIndex = SPELL_TYPE_PROJECTILE ThenfrmEditor_Spell.Frame4.Visible = TrueWith Spell(EditorIndex).ProjecTilefrmEditor_Spell.scrlProjectileDamage.Value = .DamagefrmEditor_Spell.scrlProjectilePic.Value = .PicfrmEditor_Spell.scrlProjectileRange.Value = .RangefrmEditor_Spell.scrlProjectileSpeed.Value = .SpeedEnd WithEnd Ifany of these following might be named incorrectly and so exits the subFrame4, scrlProjectileDamage, scrlProjectilePic, scrlProjectileRange, scrlProjectileSpeed Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now