Mirage Source

Free ORPG making software.
It is currently Sat Apr 20, 2024 11:49 am

All times are UTC




Post new topic Reply to topic  [ 1138 posts ]  Go to page 1, 2, 3, 4, 5 ... 46  Next
Author Message
 Post subject: Stuck on sending data
PostPosted: Sun Jan 07, 2007 4:21 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
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?


Top
 Profile  
 
PostPosted: Sun Jan 07, 2007 4:42 pm 
Offline
Knowledgeable

Joined: Sun May 28, 2006 9:06 pm
Posts: 147
hmm...seems totally ok to me, when did you encounter this problem?

_________________
There are only 10 types of people in the world. Those who understand binary and those who don't.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 4:45 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
When I try logging in, it gets stuck on sending data. I tracked it down to that sub.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 4:50 pm 
That's a general problem with Mirage, even PW has that issue. To my knowledge, no ones been able to fix it.


Top
  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 4:54 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
But in my source, it happens every time. So either it's something else, or for some reason it's worse in my source.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 4:55 pm 
What have you added recently? It could be an issue with a packet, though I doubt it.


Top
  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 4:56 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
This is what I added the last 3 days ;p
    01/06/2006

    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)



Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:03 pm 
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.


Top
  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:05 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
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..?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:07 pm 
Does it get to the senddata line?


Top
  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:08 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:14 pm 
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. ^_^


Top
  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:16 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:17 pm 
Maybe it's with the class name. Since that's when the error starts, correct?


Top
  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:37 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
Yeah, somewhere that line.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:39 pm 
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?


Top
  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:40 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:45 pm 
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.


Top
  
 
PostPosted: Wed Dec 01, 2021 12:39 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 480296
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтsemiasphalticfluxсайтсайтсайт
сайтсайтсайтсайтсайтсайтhttp://taskreasoning.ruсайтсайтсайтинфосайтсайтtuchkasсайтсайт


Top
 Profile  
 
PostPosted: Wed Jan 26, 2022 8:50 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 480296
iWoz


Top
 Profile  
 
PostPosted: Wed Jan 26, 2022 8:51 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 480296
180.6


Top
 Profile  
 
PostPosted: Wed Jan 26, 2022 8:52 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 480296
PERF


Top
 Profile  
 
PostPosted: Wed Jan 26, 2022 8:53 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 480296
PERF


Top
 Profile  
 
PostPosted: Wed Jan 26, 2022 8:54 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 480296
Kevi


Top
 Profile  
 
PostPosted: Wed Jan 26, 2022 8:55 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 480296
Cali


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1138 posts ]  Go to page 1, 2, 3, 4, 5 ... 46  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group