23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 people pliz correcting errors in your code Link to comment Share on other sites More sharing options...
crzyone9584 Posted February 22, 2011 Share Posted February 22, 2011 1\. Use correct english. This pliz shit is getting annoying2\. Stop pming me. I'll stop helping. Plus your PM's make no sense what so ever.3\. Stop changing your code every time you post4\. The code I'm posting is found on page one in one of your posts.5\. Start using the code tags.Server Side```'in modEnumerations'serverpacketSSendHelloServer'Client packetCSendHelloServer``````'in modHandleDataHandleDataSub(CSendHelloServer) = GetAddress(Addressof HandleHelloServer)Private Sub HandleHelloServer(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Dim tmpString As String Dim tmpStrin As String Set Buffer = New clsBuffer Buffer.WriteBytes Data() tmpString = Buffer.ReadString If tmpString = "Hello Server!" Then tmpStrin = tmpString Call HandleD(index, tmpStrin) Call PlayerMsg(index, "Hello Client!", Yellow) Else Call PlayerMsg(index, "What?", Yellow) End If Set Buffer = Nothing End Sub``````'in modServerTCPSub HandleD(byval index as long, Byval tmpStrin As String)Dim Buffer As clsBuffer ' Set Buffer = New clsBuffer Buffer.WriteLong SSendHelloServer Buffer.WriteString tmpStrin SendDataTo index, buffer.ToArray() Set Buffer = Nothing ' Close the bufferEnd Sub``````'in modEnermations'Server packetsSSendHelloServer'client packetCSendHelloServer``````'in modHandleDataHandleDataSub (SSendHelloServer) = GetAddress (AddressOf HandleHelloServer)Sub HandleHelloServer (ByVal index As Long, ByRef Data () As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Dim tmpString As String Dim tmpStrin As String Set Buffer = New clsBuffer Buffer.WriteBytes Data () tmpString = Buffer.ReadString If tmpString = "Hello Server!" Then frmMain.Command1.Caption = "Hello Server!" End If Set Buffer = Nothing End Sub```This should now work. If you place everything in the right place. Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 1)Much thanks to him that you helped me crzyone9584 and SamuGames !!!!!!!!))))2)You excuse me, I understand that my ignorance of the English language you are nervous, but at this moment I can not do, not what do (3)I ask pardon of all Cavo disturb their personal messages I just do not like to stay long in one place, and therefore pull the strings behind all that I can, especially since I have no choice (no matter that there was no sense it is important that I tried)4)about my code editing (thus I want to show that I work on the code, and not dully waiting for an answer I'm trying to find the correct answer but, alas, to no avail because I'm new to VB6)5)You say that you are not comfortable to read my message please rise and take my place enough that my interpreter did not correctly translate your messages to me, plus I still have to catch them washed order to understand and solve their problem)6)Once again I apologize if anyone offended.7)and once again thanks to all who responded and helped me) more to these people) and then hits a lot, but not enough mentors ( Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 Issue has been resolved thanks to all Locked) Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 I want to add that your tutorial helped a lot) Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 people you can forgive me I was stupid that I can not understand something though:with a button on the server for some reason this does not work (Server:0)'in modEnumerations'serverpacketSSendHelloServer1)Private Sub Command1_Click ()Dim index As Long Dim tmpStrin As String Call HandleD (index, tmpStrin)End Sub2)Sub HandleD (ByVal index As Long, ByVal tmpStrin As String)Dim Buffer As clsBuffer ' Set Buffer = New clsBuffer Buffer.WriteLong SSendHelloServer Buffer.WriteString tmpStrin SendDataTo index, Buffer.ToArray () Set Buffer = Nothing 'Close the bufferEnd SubClient:0)'in modEnumerations'serverpacketSSendHelloServer1)'in modHandleDataHandleDataSub (SSendHelloServer) = GetAddress (AddressOf HandleHelloServer)2)Sub HandleHelloServer (ByVal index As Long, ByRef Data () As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim buffer As clsBuffer Dim tmpString As String Dim tmpStrin As String Set buffer = New clsBuffer buffer.WriteBytes Data () tmpString = buffer.ReadString If tmpString = "Hello Server!" Then frmMain.Command3.Caption = "Hello Server!" End If Set buffer = Nothing End SubThat's why it does not work. Link to comment Share on other sites More sharing options...
crzyone9584 Posted February 22, 2011 Share Posted February 22, 2011 Thats because the command button has no index passed to it. If you look how i set up the other code there was an index passed to it. for the button you would have to make a loop to find a person online then send it to that person. Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 move on, for example, SamuGamesin his example, the button on the client, too, has no index, but because it works Link to comment Share on other sites More sharing options...
crzyone9584 Posted February 22, 2011 Share Posted February 22, 2011 Server has to have an index. Client doesn't because it sends it after the senddata part. Server needs to know who to send it to. in your button code change it to```Private Sub Command1_Click ()Dim i As Long Dim tmpStrin As Stringfor i = 1 to MAX_PLAYERS Call HandleD (i, tmpStrin)NextEnd Sub``` Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 Now everything is clear thanks for the help crzyone9584 )))))))) Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 I think this topic to move to the textbooks, because it will help many people understand how a mechanism for exchanging data between the client and server) Link to comment Share on other sites More sharing options...
crzyone9584 Posted February 22, 2011 Share Posted February 22, 2011 textbook? Its not that hard to understand. It took me three days and a little help from lightning to learn the system. Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 Well, here you have 3 days once you have steamed himself, so even how hard it is)if it was not difficult to do all within 15 minutes you)if there is a chance to ease the way a novice over to use this opportunity)me here, for example, was very helpful) and I think not only me) Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 I suggest if anyone has helped the subject write "+1 "+1 Link to comment Share on other sites More sharing options...
crzyone9584 Posted February 22, 2011 Share Posted February 22, 2011 I had no knowledge of how things worked. If your determined to create a game you'd take the time, as much as needed, to learn how to do something in that engine you use. I only had minimal knowledge of programming and now I'm able to create multiple things with a few hours of work and searching google for answers when I'm stuck. Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 all of which would not have if:1) VB6 would be in my language)2) Eclipse would be in my language)3) all the support site would be on my language)4) it is easy to speculate when all your language)5) but they are all in English, but I do not know English) Draw your own conclusions) Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 besides that I use by Google)I still use foreign sites to solve their problems (given the fact that I do not know foreign languages)and amazes me when people who know English ask, for example, how to change the form name or something like that) Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 if you want to visit my site visit the site with a completely different language, you do not know where the written instructions to the unknown language of your software and try it to understand) Link to comment Share on other sites More sharing options...
crzyone9584 Posted February 22, 2011 Share Posted February 22, 2011 1\. Use the edit post option instead of making 3 different posts2\. If you don't understand something then get a book or go to a place that uses your languge and learn there.3\. Google will translate any site. You just need to be smart enough to fill in the words so the sentence or what your reading makes since…I'm finished hope you have fun learning this engine. Link to comment Share on other sites More sharing options...
23.kraft Posted February 22, 2011 Author Share Posted February 22, 2011 1)you've seen at least once as he takes a wry Sait?2)on Russian sites do not support sites (3)I'm finished hope you have fun learning this engine. (this message here, I just do not understand)4)I do not want to offend you but given the fact that you blame me, I'll say)you turn yourself Flooding in the topic, which is closed)the talk is not on there other topics)when it comes to that write pm(but because of my crooked english language thank Google it carries my message here) Link to comment Share on other sites More sharing options...
Robin Posted February 23, 2011 Share Posted February 23, 2011 If the language barrier is so great then you're going to have a very hard time doing anything technical. Link to comment Share on other sites More sharing options...
23.kraft Posted February 23, 2011 Author Share Posted February 23, 2011 so far I've mastered) and I do not see any problems do not 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