Growlith1223 Posted August 25, 2012 Author Share Posted August 25, 2012 ok so like, i've made everything perfect no errors until the npc wants to join…it subscripts on this sub.```Sub HandleRequestJoin(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBuffer' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteByte Data()Index = Buffer.ReadLongSet Buffer = NothingWith frmMain.picpokemonJoin.Visible = True.lblInfo.Caption = Npc(Index).Name & " wants to join!"End With' Error handlerExit Suberrorhandler:HandleError "HandleData", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub```it highlights the .lblInfo parti highlight Index in that area and it says 0Help is appreciated! Link to comment Share on other sites More sharing options...
JohnPony Posted August 25, 2012 Share Posted August 25, 2012 ```Sub HandleRequestJoin(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim i as long' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteByte Data()I = Buffer.ReadLongSet Buffer = NothingWith frmMain.picpokemonJoin.Visible = Trueif Npc(I).Name <> Vbnullstring then.lblInfo.Caption = Npc(I).Name & " wants to join!"end ifEnd With' Error handlerExit Suberrorhandler:HandleError "HandleData", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub``` Link to comment Share on other sites More sharing options...
BeNjO Posted August 25, 2012 Share Posted August 25, 2012 > ```> [color]Sub[/color][color] [/color][color]HandleRequestJoin[/color][color]([/color][color]ByVal[/color][color] [/color][color]Index[/color][color] [/color][color]As[/color][color] [/color][color]Long[/color][color],[/color][color] [/color][color]ByRef[/color][color] [/color][color]Data[/color][color]()[/color][color] [/color][color]As[/color][color] [/color][color]Byte[/color][color],[/color][color] [/color][color]ByVal[/color][color] [/color][color]StartAddr[/color][color] [/color][color]As[/color][color] [/color][color]Long[/color][color],[/color][color] [/color][color]ByVal[/color][color] [/color][color]ExtraVar[/color][color] [/color][color]As[/color][color] [/color][color]Long[/color][color])[/color]> > [color]Dim[/color][color] [/color][color]Buffer[/color][color] [/color][color]As[/color][color] clsBuffer> > Dim i as long> > [/color][color]' If debug mode, handle error then exit out> > If Options.Debug = 1 Then On Error GoTo errorhandler> > Set Buffer = New clsBuffer> > Buffer.WriteByte Data()> > I = Buffer.ReadLong> > Set Buffer = Nothing> > With frmMain> > .picpokemonJoin.Visible = True> > .lblInfo.Caption = Npc(I).Name & " wants to join!"> > End With> > '[/color][color] [/color][color]Error[/color][color] handler> > [/color][color]Exit[/color][color] [/color][color]Sub[/color]> > [color]errorhandler[/color][color]:[/color]> > [color]HandleError[/color][color] [/color][color]"HandleData"[/color][color],[/color][color] [/color][color]"modHandleData"[/color][color],[/color][color] [/color][color]Err[/color][color].[/color][color]Number[/color][color],[/color][color] [/color][color]Err[/color][color].[/color][color]Description[/color][color],[/color][color] [/color][color]Err[/color][color].[/color][color]Source[/color][color],[/color][color] [/color][color]Err[/color][color].[/color][color]HelpContext[/color]> > [color]Err[/color][color].[/color][color]Clear[/color]> > [color]Exit[/color][color] [/color][color]Sub[/color]> > [color]End[/color][color] [/color][color]Sub[/color]> ```dafuq? that made me lol and couldnt help but reply Link to comment Share on other sites More sharing options...
Growlith1223 Posted August 25, 2012 Author Share Posted August 25, 2012 dude you just made it the same…epic fail for ju Link to comment Share on other sites More sharing options...
JohnPony Posted August 25, 2012 Share Posted August 25, 2012 > dude you just made it the same…epic fail for juDon't blame me, blame the forum. I fixed it, i had to copy directly to notepad and copy back. Link to comment Share on other sites More sharing options...
PD Posted August 25, 2012 Share Posted August 25, 2012 Here we go:```Sub HandleRequestJoin(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim nIndex As Long' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteByte Data()nIndex = Buffer.ReadLongSet Buffer = NothingWith frmMain.picpokemonJoin.Visible = True.lblInfo.Caption = Trim$(Npc(nIndex).Name) & " wants to join!"End With' Error handlerExit Suberrorhandler:HandleError "HandleData", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub``` Link to comment Share on other sites More sharing options...
Growlith1223 Posted August 25, 2012 Author Share Posted August 25, 2012 oh my gawd you guys are just doing the same damn thing… Link to comment Share on other sites More sharing options...
BeNjO Posted August 25, 2012 Share Posted August 25, 2012 troll much?I = Buffer.ReadLong Link to comment Share on other sites More sharing options...
Growlith1223 Posted August 25, 2012 Author Share Posted August 25, 2012 Tehdoug just gtfo…ur not helping.... ![-_-](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/sleep.png)Anyways here's the sub for sending the packet.```Sub NpcRecruitmentRequest(ByVal index As Long, ByVal npcNum As Long)Dim Buffer As clsBufferSet Buffer = New clsBuffer Buffer.WriteLong SRequestJoin Buffer.WriteLong npcNum SendDataTo index, Buffer.ToArray()Set Buffer = NothingExit SubEnd Sub``` Link to comment Share on other sites More sharing options...
Link Posted August 25, 2012 Share Posted August 25, 2012 > Sub HandleRequestJoin(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)> > Dim Buffer As clsBuffer> > Dim i As Long> > ' If debug mode, handle error then exit out> > If Options.Debug = 1 Then On Error GoTo errorhandler> > Set Buffer = New clsBuffer> > Buffer.WriteBytes Data()> > i = Buffer.ReadLong> > Set Buffer = Nothing> > Call RecruitableNpcKilled(i)> > ' Error handler> > Exit Sub> > errorhandler:> > HandleError "HandleHotbar", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext> > Err.Clear> > Exit Sub> > End SubNow create a new mod called mod modRecruitment or something and in that mod add-> Public Function RecruitableNpcKilled(ByVal NpcNum As Long)> > frmMain.picpokemonJoin.Visible = True> > frmMain.picRecruitFace.Picture = LoadPicture(App.Path & GFX_PATH & "\faces\" & Npc(NpcNum).Sprite & ".bmp") (Only if you have)> > RecruitNpcNum = NpcNum> > End Function Link to comment Share on other sites More sharing options...
Growlith1223 Posted August 25, 2012 Author Share Posted August 25, 2012 THANKYOU! Finally someone is not dumb enough to just add one line that will just end up doing that same thing! Link to comment Share on other sites More sharing options...
Link Posted August 25, 2012 Share Posted August 25, 2012 [Edited]~I guess this part was uneeded, even though it was still useful. Link to comment Share on other sites More sharing options...
PD Posted August 25, 2012 Share Posted August 25, 2012 How the duck does creating a new function fix the problem? Someone please enlighten me, I was using TeamViewer to help him out but nothing worked and now this ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
Growlith1223 Posted August 25, 2012 Author Share Posted August 25, 2012 ikr? xD Link to comment Share on other sites More sharing options...
JohnPony Posted August 26, 2012 Share Posted August 26, 2012 Use.ducking.NullStringChecks. Link to comment Share on other sites More sharing options...
Link Posted August 26, 2012 Share Posted August 26, 2012 There was no need for the <>nullstring in the first place. Link to comment Share on other sites More sharing options...
JohnPony Posted August 26, 2012 Share Posted August 26, 2012 > There was no need for the <>nullstring in the first place.It is good practice to make sure the string actually has a value, so why not have it?Also, before you decide to act like you ducking solved the problem, please notice you just took what me and zesh posted, and made it call a unneeded function. You did the same damn thing.> THANKYOU! Finally someone is not dumb enough to just add one line that will just end up doing that same thing!You really have the idea to call someone a dumbass who attempted to help your sorry ass, fine. Don't expect any help from me anymore. Link to comment Share on other sites More sharing options...
Link Posted August 26, 2012 Share Posted August 26, 2012 One, I solved the problem I'm not acting and I don't remember pretending to be a smartass like you're doing right now I simply helped by applying what I knew…it's not my fault that was something you failed to do.Two I didn't take anything from you or Zesh, I took what Zero posted and applied code to make it work I don't need you or zesh to do so, so don't go acting high and mighty oh and fyi I have my own system similar to what he's trying to make just more advanced so it's not that hard for me to know what to do it's simply trial and error until you get it right.Don't be a ducking douchebag just move on and be glad that zero got the help that was needed I'm simply here answering questions.Nevertheless I'm being a bit immature as this isn't the place for negative comments.Edit: btw I don't remember growlith directly calling anyone dumb, but if you have three people posting the same thing which isn't helping use sense that's just annoying that doesn't mean you should stop being helpful to someone. Link to comment Share on other sites More sharing options...
JohnPony Posted August 26, 2012 Share Posted August 26, 2012 > One, I solved the problem I'm not acting and I don't remember pretending to be a smartass like you're doing right now I simply helped by applying what I knew…it's not my fault that was something you failed to do.> > Two I didn't take anything from you or Zesh, I took what Zero posted and applied code to make it work I don't need you or zesh to do so, so don't go acting high and mighty oh and fyi I have my own system similar to what he's trying to make just more advanced so it's not that hard for me to know what to do it's simply trial and error until you get it right.> > Don't be a ducking douchebag just move on and be glad that zero got the help that was needed I'm simply here answering questions.Nevertheless I'm being a bit immature as this isn't the place for negative comments.> > Edit: btw I don't remember growlith directly calling anyone dumb, but if you have three people posting the same thing which isn't helping use sense that's just annoying that doesn't mean you should stop being helpful to someone.I apologize for coming off as a childish stick. Argument over. Link to comment Share on other sites More sharing options...
Link Posted August 26, 2012 Share Posted August 26, 2012 As said earlier I also apologize. 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