Mirage Source http://miragesource.net/forums/ |
|
Stuck on sending data http://miragesource.net/forums/viewtopic.php?f=201&t=1084 |
Page 1 of 46 |
Author: | Joost [ Sun Jan 07, 2007 4:21 pm ] |
Post subject: | Stuck on sending data |
Code: Sub SendChars(ByVal index As Long)
Dim Packet As String Dim i As Long Packet = "allchars" & SEP_CHAR For i = 1 To MAX_CHARS Packet = Packet & Trim(Player(index).Char(i).Name) & SEP_CHAR & Trim(Class(Player(index).Char(i).Class).Name) & SEP_CHAR & Player(index).Char(i).Level & SEP_CHAR Next i Packet = Packet & END_CHAR Call SendDataTo(index, Packet) End Sub This sub is being called (So that's not the problem) but, it doesn't reaches the last line, the Call SendDataTo(index, Packet). I really can't see any mistakes in it, and I haven't even edited it. So what's the problem? |
Author: | Gilgamesch [ Sun Jan 07, 2007 4:42 pm ] |
Post subject: | Re: Stuck on sending data |
hmm...seems totally ok to me, when did you encounter this problem? |
Author: | Joost [ Sun Jan 07, 2007 4:45 pm ] |
Post subject: | |
When I try logging in, it gets stuck on sending data. I tracked it down to that sub. |
Author: | Matt [ Sun Jan 07, 2007 4:50 pm ] |
Post subject: | |
That's a general problem with Mirage, even PW has that issue. To my knowledge, no ones been able to fix it. |
Author: | Joost [ Sun Jan 07, 2007 4:54 pm ] |
Post subject: | |
But in my source, it happens every time. So either it's something else, or for some reason it's worse in my source. |
Author: | Matt [ Sun Jan 07, 2007 4:55 pm ] |
Post subject: | |
What have you added recently? It could be an issue with a packet, though I doubt it. |
Author: | Joost [ Sun Jan 07, 2007 4:56 pm ] |
Post subject: | |
This is what I added the last 3 days ;p
001. FIXED Small bugfix with the heal attribute 002. ADDED Admin with access level > 4 can now create guilds trough the admin panel 003. FIXED Fixed the fix item bug 004. ADDED Fill button in mapeditor 005. ADDED Clear map button in mapeditor 006. FIXED Cleaned up Sub IncomingData() server-side. Everything should be a tad faster now 007. ADDED New attribute, PLAYERBLOCK, players cant walk over it, NPC's can 008. ADDED Added a "sign" attribute client-side. Haven't done server-side yet 009. ADDED Can't move trough a "sign" attribute anymore 010. FIXED Fixed up signs. They work 100% now 011. ADDED Added a MAX_TILE_ROW variable, now you can have huge tiles.bmp's 012. ADDED Converted player accounts to binary 013. FIXED NPC's are now targetted when standing on items 014. FIXED Added packet spoofing fix 015. ADDED Converted items to binary 016. ADDED Converted spells to binary 017. ADDED Converted maps to binary 018. ADDED Converted shops to binary 019. ADDED Converted classes to binary 020. STARTED Started on ranged weapons, not finished. Huge headache, good to bed now 021. FIXED I think I fixed arrows client-side, now just server-side 022. FIXED Converted PasswordOK to binary, gave me some errors 023. FIXED Fixes small error with DirRight 024. FIXED Fixed same error with Dirleft 025. ADDED Yay, binary account editor done. With help from PSC and Dave's account editor 026. ADDED Added buggy bows. Still need to debug... 027. ADDED Made every packet from client to server 50% smaller, I expect some bugs 01/05/2006 Fixed/Additions: 001. ADDED. A /global on and /global off command for server owners to turn off or on global chat 002. ADDED. Finally did a working admin panel. Has all options and works similiar like the old one, but a bit different. 003. ADDED. A working edit stats menu, used to edit player's stats 004. FIXED Account duping bug 005. ADDED Added a SendDataToGuild function, for better overview 006. ADDED Guild messages. Usage "@ Hello Guild!" 007. FIXED Tileset is now 7*1000 instead of 7*255 008. FIXED MAX_ITEMS now is 1000 009. FIXED Password are now case-sensitive 010. DELETED Deleted a whole bunch of forms. I hope this'll make it go noticably faster. 011. ADDED Added 3 new attributes. Damage, heal and door. 012. ADDED Different colors for admin access levels 013. ADDED Added sound for attacking, criticals, misses, keys, warps, and damage tiles 014. FIXED Optimized the save player sub 015. FIXED Cleaned up and improved Sub HandleData 016. FIXED Greatly reduced RAM usage. I expect some bugs though 017. ADDED A warning button in the admin panel, for moderaters. 01/04/2006 Fixes/Additions: 001. FIXED. Credits window 002. ADDED. Versions.txt 003. ADDED. Client Data.ini 004. FIXED. Music 005. CHANGED. Graphics should be in GFX subdirectory 006. CHANGED. Music should be in Music subdirectory 007. ADDED. Support for up to 100 players 008. ADDED. Support for 5000 maps 009. FIXED. Client crashing when there is no such midi file 010. ADDED. Map morals have been changed. 2 new ones addeed Savage Land (Yellow Color): Similiar to the None moral only with less death penalties. You can kill others but they will only drop 1 item Arena(Grey Color): No death penalty 011. FIXED. GFX error message 012. ADDED. Small security update 013. ADDED. If server was running when you shut down your computer, it'll now automaticly start up again if you start your computer again 014. ADDED Ability for server owners to use the /reboot command to reboot the server. 015. ADDED Ability for server owners to use the /shutdown command 016. ADDED Friendly NPC's and shopkeepers can now "talk". (Used with CTRL) 017. CHANGED Increased scrollbar for npc's from 255 to 999 on STR, DEF, MAGI and SPEED 018. FIXED Minor bug in PlayerRec 019. FIXED Increased Item STR (vital mod) on scrollbar from 255 to 999 020. FIXED Increased scrollbar for spell STR(Vital Mod) to 999 021. ADDED Added scrollbar to handle MP used at Spell Creation. (First real pain in the ass) 022. FIXED Spell level req 023. ADDED Guilds. =( (It's impossible to actually create guilds yet) |
Author: | Matt [ Sun Jan 07, 2007 5:03 pm ] |
Post subject: | |
Wow. Just so you know, I have a tut for fully function guilds if you want it. Here is my sub sendchars Code: Sub SendChars(ByVal index As Long) Dim packet As String Dim i As Long packet = "ALLCHARS" & SEP_CHAR For i = 1 To MAX_CHARS packet = packet & Trim(Player(index).Char(i).Name) & SEP_CHAR & Trim(Class(Player(index).Char(i).Class).Name) & SEP_CHAR & Player(index).Char(i).Level & SEP_CHAR Next i packet = packet & END_CHAR Call SendDataTo(index, packet) End Sub Here is how the client recieves it: Code: ' :::::::::::::::::::::::::::
' :: All characters packet :: ' ::::::::::::::::::::::::::: If LCase(Parse(0)) = "allchars" Then n = 1 'frmChars.Visible = True frmSendGetData.Visible = False frmMain.lstChars.Clear For i = 1 To MAX_CHARS Name = Parse(n) Msg = Parse(n + 1) Level = Val(Parse(n + 2)) If Trim(Name) = "" Then frmMain.lstChars.AddItem "Free Character Slot" Else frmMain.lstChars.AddItem Name & " a level " & Level & " " & Msg End If n = n + 3 Next i frmMain.lstChars.ListIndex = 0 Exit Sub End If I've removed the frmChars though, just so you know. |
Author: | Joost [ Sun Jan 07, 2007 5:05 pm ] |
Post subject: | |
I added a check at my Code: If LCase(Parse(0)) = "allchars" Then
and, well, it never even gets there. Had the exact same problem with your sub SendChars And my own guild system should work now ;p. Can the problem have anything to do with binary accounts? I looked in Valkoria, and it uses the "normal" SendChars sub, so I doubt it, but maybe..? |
Author: | Matt [ Sun Jan 07, 2007 5:07 pm ] |
Post subject: | |
Does it get to the senddata line? |
Author: | Joost [ Sun Jan 07, 2007 5:08 pm ] |
Post subject: | |
Code: For i = 1 To MAX_CHARS
packet = packet & Trim(Player(index).Char(i).Name) & SEP_CHAR & Trim(Class(Player(index).Char(i).Class).Name) & SEP_CHAR & Player(index).Char(i).Level & SEP_CHAR Next i It gets stuck on that piece. |
Author: | Matt [ Sun Jan 07, 2007 5:14 pm ] |
Post subject: | |
Maybe if you break it up? Code: For i = 1 To MAX_CHARS
packet = packet & Trim(Player(index).Char(i).Name) & SEP_CHAR packet = packet & Trim(Class(Player(index).Char(i).Class).Name) & SEP_CHAR packet = packet & Player(index).Char(i).Level & SEP_CHAR Next i Might not help, prolly won't, but hey, it's worth a try. ^_^ |
Author: | Joost [ Sun Jan 07, 2007 5:16 pm ] |
Post subject: | |
It didn't fix it, but it did help, I now know the error is inbetween these lines : Quote: packet = packet & Trim(Class(Player(index).Char(i).Class).Name) & SEP_CHAR
packet = packet & Player(index).Char(i).Level & SEP_CHAR |
Author: | Matt [ Sun Jan 07, 2007 5:17 pm ] |
Post subject: | |
Maybe it's with the class name. Since that's when the error starts, correct? |
Author: | Joost [ Sun Jan 07, 2007 5:37 pm ] |
Post subject: | |
Yeah, somewhere that line. |
Author: | Matt [ Sun Jan 07, 2007 5:39 pm ] |
Post subject: | |
I don't think it has anything to do with binary accounts. I have them and have no issue with this. Do you have binary classes? |
Author: | Joost [ Sun Jan 07, 2007 5:40 pm ] |
Post subject: | |
Yup. If I change it to Code: packet = packet & Trim(Player(index).Char(i).Class) & SEP_CHAR
it works. But that gives the class number, not the name. |
Author: | Matt [ Sun Jan 07, 2007 5:45 pm ] |
Post subject: | |
Then maybe you should revert back to ini classes. They don't get loaded much, just upon character creation, I believe. Try going back to ini classes and see if that fixes your issue. |
Author: | wanai [ Wed Jan 26, 2022 8:50 pm ] |
Post subject: | Re: Stuck on sending data |
iWoz |
Author: | wanai [ Wed Jan 26, 2022 8:51 pm ] |
Post subject: | Re: Stuck on sending data |
180.6 |
Author: | wanai [ Wed Jan 26, 2022 8:52 pm ] |
Post subject: | Re: Stuck on sending data |
PERF |
Author: | wanai [ Wed Jan 26, 2022 8:53 pm ] |
Post subject: | Re: Stuck on sending data |
PERF |
Author: | wanai [ Wed Jan 26, 2022 8:54 pm ] |
Post subject: | Re: Stuck on sending data |
Kevi |
Author: | wanai [ Wed Jan 26, 2022 8:55 pm ] |
Post subject: | Re: Stuck on sending data |
Cali |
Page 1 of 46 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |