Murdoc Posted September 18, 2010 Author Share Posted September 18, 2010 I'm fairly new to vb, and wondering how I can call this Sub from the client to the server under CanAttackNpc:Public Sub QuestWindow(ByVal EditorIndex As Byte) frmMainGame.picQuestBack.Visible = True frmMainGame.lblQuestMsg.Caption = Trim$(Npc(EditorIndex).QuestMsg1) frmMainGame.lblQuestMsg.Visible = TrueEnd SubI'm not sure If I have the definitions right. But basically I want to call a picturebox (from a Server side code) with text on it. The text is determined by QuestMsg1\. Any help is appreciated. :) Link to comment Share on other sites More sharing options...
DshWinchester Posted September 18, 2010 Share Posted September 18, 2010 I am new too but I will try ;DCLIENT :huh:search ' Packets sent by server to clientadd```SQuestPic```modHandleDataHandleDataSub(SQuestPic) = GetAddress(AddressOf HandleQuestPic)and add this sub```Private Sub HandleQuestPic(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim msg As StringSet Buffer = New clsBufferBuffer.WriteBytes Data()msg = buffer.readstringSet Buffer = Nothing frmMainGame.picQuestBack.Visible = True frmMainGame.lblQuestMsg.Caption = "" & msg & "" frmMainGame.lblQuestMsg.Visible = Trueend sub```FinishNow servermake some sub as you likeI will make this as exemple```Sub QuestMsg(byval index as long,byval msg as string)Dim Buffer As clsBufferSet Buffer = New clsBufferBuffer.WriteLong SQuestPicBuffer.WriteString MsgSendDataTo index, Buffer.ToArray() Set Buffer = Nothingend sub```search ' Packets sent by server to clientadd this SQuestPicthere we gogood luck :renzo: Link to comment Share on other sites More sharing options...
Murdoc Posted September 18, 2010 Author Share Posted September 18, 2010 Thanks, it worked like a charm :) 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