Sir Topham Hatt Posted March 11, 2011 Author Share Posted March 11, 2011 Okay when I hover a button thats index is 7 it crashes. I have no idea why. I have the Quests button on index 5 and the trade on index 6 while the party button is on index 7\. When I hover the buttons they all work but index 7 (Party button) Is there something I have to add elsewhere to accept the seventh button?>! Private Sub imgButton_Click(Index As Integer)Dim Buffer As clsBufferDim i As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Select Case Index Case 1 If Not picInventory.Visible Then ' show the window picInventory.Visible = True picCharacter.Visible = False picSpells.Visible = False picOptions.Visible = False picParty.Visible = False picQuests.Visible = False BltInventory ' play sound PlaySound Sound_ButtonClick End If Case 2 If Not picSpells.Visible Then ' send packet Set Buffer = New clsBuffer Buffer.WriteLong CSpells SendData Buffer.ToArray() Set Buffer = Nothing ' show the window picSpells.Visible = True picInventory.Visible = False picCharacter.Visible = False picOptions.Visible = False picParty.Visible = False picQuests.Visible = False ' play sound PlaySound Sound_ButtonClick End If Case 3 If Not picCharacter.Visible Then ' send packet SendRequestPlayerData ' show the window picCharacter.Visible = True picInventory.Visible = False picSpells.Visible = False picOptions.Visible = False picParty.Visible = False picQuests.Visible = False ' play sound PlaySound Sound_ButtonClick ' Render BltEquipment BltFace End If Case 4 If Not picOptions.Visible Then ' show the window picCharacter.Visible = False picInventory.Visible = False picSpells.Visible = False picOptions.Visible = True picParty.Visible = False picQuests.Visible = False ' play sound PlaySound Sound_ButtonClick End If Case 5 If Not picQuests.Visible Then ' show the window picInventory.Visible = False picCharacter.Visible = False picSpells.Visible = False picOptions.Visible = False picParty.Visible = False picQuests.Visible = True ' play sound PlaySound Sound_ButtonClick End If Case 6 If myTargetType = TARGET_TYPE_PLAYER And myTarget <> MyIndex Then SendTradeRequest ' play sound PlaySound Sound_ButtonClick Else AddText "Invalid trade target.", BrightRed End If Case 7 ' show the window picCharacter.Visible = False picInventory.Visible = False picSpells.Visible = False picOptions.Visible = False picParty.Visible = True picQuests.Visible = False ' play sound PlaySound Sound_ButtonClick End Select ' Error handler Exit Suberrorhandler: HandleError "imgButton_Click", "frmMain", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 11, 2011 Share Posted March 11, 2011 Its just a guess, did you change the amount of buttons in mod constants?In Mod Constants (client side) under 'animated buttonsChange```Public Const MAX_MAINBUTTONS As Long = 6```to```Public Const MAX_MAINBUTTONS As Long = 7```if this dosnt help a bit, shoot me XDthough im not shure how this will look in the layout =P Link to comment Share on other sites More sharing options...
Robin Posted March 11, 2011 Share Posted March 11, 2011 Need to change the button array size and initialise the button. Link to comment Share on other sites More sharing options...
Sir Topham Hatt Posted March 11, 2011 Author Share Posted March 11, 2011 Thanks you two it works now. Next part is to get the picture and the button together. I hope that made sense. Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 11, 2011 Share Posted March 11, 2011 O.o your welcome…. Wiat, I helped? It worked? =o I never contribute to any project in a helpful way... I LOVE THIS PLACE!!! =D Link to comment Share on other sites More sharing options...
Sir Topham Hatt Posted March 16, 2011 Author Share Posted March 16, 2011 Yep you helped now just have to figure out how to add a quest system, I want it purely VB 6.0 not that scripted stuff. First thing I guess I have to do is update the player save file. Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 17, 2011 Share Posted March 17, 2011 For a completly VB6 quest system I sugest doing these 3 tutorials in order. It ends up with a graphical quest system that can give EXP as rewards, however, it uses basic quest scripting in VB6 and you have to compile your server for every new quest you make.=/ not shure if you ment scripting as using script files or scripting your own in general…. =X but if you want full control, this is the only way i can think of that only uses VB6Also these work well for making multi stem quests, lke one where you kill monsters then also gather items. The quests can also be made repeteable.#1http://www.touchofdeathforums.com/smf/index.php/topic,68426.0.html#2http://www.touchofdeathforums.com/smf/index.php/topic,69062.0.html#3http://www.touchofdeathforums.com/smf/index.php/topic,69793.0.html 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