| Mirage Source http://www.miragesource.net/forums/ |
|
| Question about packets http://www.miragesource.net/forums/viewtopic.php?f=201&t=3233 |
Page 1 of 1 |
| Author: | Anthony [ Sat Jan 05, 2008 9:28 pm ] |
| Post subject: | Question about packets |
So I am starting to go through, and using Williams Enum tutorial, changing all my packets. I remember DFA mentioning about the & SEP_CHAR & END_CHAR thing. Nobody really said anything about it and not that I don't trust his judgment I would just like another opinion before I go removing them all. So can I remove that extra & SEP_CHAR without damaging anything? Or is there a specific reason it is there? |
|
| Author: | Cruzn [ Sat Jan 05, 2008 9:34 pm ] |
| Post subject: | Re: Question about packets |
Vegeta wrote: So can I remove that extra & SEP_CHAR without damaging anything? Yes.
|
|
| Author: | Rezeyu [ Sat Jan 05, 2008 10:07 pm ] |
| Post subject: | Re: Question about packets |
I was the one that told DFA to do it, it works fine. |
|
| Author: | Anthony [ Sat Jan 05, 2008 10:54 pm ] |
| Post subject: | Re: Question about packets |
Thanks, and I knew it was you Rezeyu haha, I just forgot your name but knew it was DFAs topic I have a new question.. Like I said I am adding Williams Packet Enum tut. After changing all the packets from server to client only I am getting subscript out of range errors on almost everything. If I change the newly named packet from CPNTrade back to "trade" on both ends it works again. It seems to be doing this on all of them at the Val(Parse(2)). Any ideas? Thanks! |
|
| Author: | Cruzn [ Sat Jan 05, 2008 11:13 pm ] |
| Post subject: | Re: Question about packets |
I don't know the tutorial, but are you sure you're not checking "CPNTrade" against lcase("CPNTrade")? CPNTrade vs. cpntrade Code: parse(0) = lcase(parse(0)) switch(parse(0)) case "CPNTrade" Parse(0) is lowercase, but your cases are not. Not sure if switches are case sensitive in VB6 though. :S |
|
| Author: | Anthony [ Sat Jan 05, 2008 11:26 pm ] |
| Post subject: | Re: Question about packets |
I did look through what you mentioned and read some more of the tutorial as well as some of the replies by Aranshada. I added = 0 to my CPNTrade in the Enum and it worked. I don't know why and would like to know haha. Can anybody explain it to me? -edit- Ok nvm, that actually did nothing haha, but for some reason I am not getting a subscript out of range anymore on CPNTrade but it has moved to CPNAllChars... Ugh haha. |
|
| Author: | Lea [ Sun Jan 06, 2008 12:02 am ] |
| Post subject: | Re: Question about packets |
If you remove the last SEP_CHAR you will have an END_CHAR appended to your last data. I think it would cause problems to remove it. Remember, the packets are strings, and SEP_CHR and END_CHAR are simply variables that hold the value of one character. |
|
| Author: | Anthony [ Sun Jan 06, 2008 12:06 am ] |
| Post subject: | Re: Question about packets |
Dave was correct. After replacing the & SEP_CHAR before the END_CHAR it fixed the runtime errors I was receiving. It seems as if leaving some out doesn't cause problems? Or should they all remain where they are. -edit- It seems as if I am parsing anything more than 0 and 1 that I get the runtime error. |
|
| Author: | Rezeyu [ Sun Jan 06, 2008 12:25 am ] |
| Post subject: | Re: Question about packets |
I haven't gotten any errors at all. I remember having to change something in the way packets were received though. |
|
| Author: | Stomach Pulser [ Sun Jan 06, 2008 2:26 am ] |
| Post subject: | Re: Question about packets |
All I did was replaces "& SEP_CHAR & END_CHAR" with "& END_CHAR" in both the client and the server. I really didn't do much else. |
|
| Author: | Dragoons Master [ Sun Jan 06, 2008 2:42 am ] |
| Post subject: | Re: Question about packets |
Probably your packet receiving was already wrong but with the extra variable(the extra SEP_CHAR fakes one more variable but actually there is none) it was not showing you the error but now, with out the extra variable you can see the bugs. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|