Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

goku1993

Members
  • Posts

    196
  • Joined

  • Last visited

Posts posted by goku1993

  1. Ok wait, this might just be me but where's SaveQuest's sub? I'm looking at the tutorial and i see a Call SaveQuest  but i can't actually find savequest…

    (might just be me with something stupid, like i didn't see it or something but i really can't find it, if this is a stupid question sorry)

    I'm seriously thinking that I'm hallucinating because alvin didn't report a message saying that the sub doesn't exist.So I don't know what to believe.
  2. well to open 2 servers you have to change the port of each and to make the client run both either change the port to something for each client or you would have to code in a way to choose between the 2 servers(i think there is a tutorial somewhere not sure though)
  3. ok well i have been looking for days in my code and i coudn't find the reason the guild system wasn't removing the person from the guild, and the weird thing is it removes the member when he's a leader but not otherwise… here is what i have

    ```
    Public Sub Guild_PlayerLeave(ByVal index As Long)
    Dim guildNum As Long, i As Long, Name As String

        guildNum = Player(index).guildNum
        Name = Player(index).Guild
        Call LoadGuild(guildNum, Name)
        If guildNum > 0 Then
            ' find out how many members we have
            Guild_CountMembers guildNum
            If Guild(guildNum).MemberCount > 0 Then
                ' check if leader
                If Guild(guildNum).Founder = Trim$(Player(index).Name) Then
                    ' set next person down as leader
                    For i = 1 To MAX_GUILD_MEMBERS
                        If Not Guild(guildNum).Member(i) = vbNullString And Guild(guildNum).Member(i) <> Player(index).Name Then
                            Guild(guildNum).Founder = Guild(guildNum).Member(i)
                            Guild(guildNum).Member(1) = Guild(guildNum).Member(i)
                            'GuildMsg guildNum, GetPlayerName(i) & " is now the guild leader.", BrightBlue
                        Call SavePlayer(index)
                        Call SaveGuild(guildNum)
                            Exit For
                        End If
                    Next
                    ' leave guild
                    'GuildMsg guildNum, GetPlayerName(index) & " has left the guild.", BrightRed
                    ' remove from array
                    For i = 1 To MAX_GUILD_MEMBERS
                        If Guild(guildNum).Member(i) = Trim$(Player(index).Name) Then
                            Guild(guildNum).Member(i) = vbNullString
                            'save guild
                            Call SaveGuild(guildNum)
                            Exit For
                        End If
                    Next
                    'remove from player
                    Player(index).guildNum = 0
                    Player(index).Guild = vbNullString
                    ' recount guild
                    Guild_CountMembers guildNum
                    ' set update to all
                    SendGuildUpdate guildNum
                    ' send clear to player
                    SendGuildUpdateTo index
                    ' save player
                    Call SavePlayer(index)
                Else
                    ' not the leader, just leave
                  ' GuildMsg guildNum, GetPlayerName(index) & " has left the guild.", BrightRed
                    ' remove from array
                    For i = 1 To MAX_GUILD_MEMBERS
                        If Guild(guildNum).Member(i) = Trim$(Player(index).Name) Then
                            Guild(guildNum).Member(i) = vbNullString
                            'save guild
                            Call SaveGuild(guildNum)
                            Exit For
                        End If
                    Next
                    'remove from player
                    Player(index).guildNum = 0
                    Player(index).Guild = vbNullString
                    ' recount guild
                    Guild_CountMembers guildNum
                    ' set update to all
                    SendGuildUpdate guildNum
                    ' send clear to player
                    SendGuildUpdateTo index
                    'save player
                    Call SavePlayer(index)
                End If
            Else
                ' find out how many members we have
                Guild_CountMembers guildNum
                ' clear out everyone's guild
                For i = 1 To MAX_GUILD_MEMBERS
                    index = Guild(guildNum).Member(i)
                    ' player exist?
                    If Not index = vbNullString Then
                    'remove from player
                    Player(index).guildNum = 0
                    Player(index).Guild = vbNullString
                        ' send clear to players
                        SendGuildUpdateTo index
                        'save player and guild
                        Call SavePlayer(index)
                        Call SaveGuild(guildNum)
                    End If
                Next
                ' clear out the guild itself
                ClearGuild guildNum
            End If
        End If
    TempPlayer(index).guildInvite = 0
    End Sub
    ```
    oh and the guild save and stuff do work since the guild system is fine this is the only problem i'm having removing the players from the dat

    any help would be appreciated, thank you
  4. if you have vb6 , go server side then sub Ondeath
    and add

    ```
    'Drop inventory items
        For i = 1 To MAX_INV
        PlayerMapDropItem index, i, 0
        Next
    ```
  5. here's the problem,
    i got an out of stack space error on
    ```
    If IsConnected(index) Then
    ```it's in isplaying sub by the way(just saying)

    and i know that the problem is from this sub
    ```
    Public Sub GuildMsg(ByVal guildNum As Long, ByVal Msg As String, ByVal color As Byte)
    Dim i As Long, Player As Long
        For i = 1 To MAX_GUILD_MEMBERS
            If Not Guild(guildNum).Member(i) = vbNullString Then
            Player = FindPlayer(Guild(guildNum).Member(i))
                If IsConnected(Player) And IsPlaying(Player) Then
                    GuildMsg Player, Msg, color
                End If
            End If
        Next
    End Sub
    ```
    i searched a bit and i found out that out of stack means that i m using too much of the resources and stuff and that i should optimize it but i can't really find something to optimize…

    thank you for your help
  6. i know how the code should be i m just wondering if vbnullstring does actually delete the data because it's not…  but i researched a bit i probably messed up somewhere so nevermind
  7. What do you mean there is no way? in EO sprites are dynamic so he can use the first sprite sheet as long as the character's order is in the same way as the second one.
  8. I've been testing something and i realized that if for example:
    ```
    Guild(guildNum).Member(i) = player(index).name
    call saveguild(guildNum) 
    ```
    works but should the code below delete the player name or not? because it's not deleting it for me and have been wondering if it was somthing in the code or if vbnullstring would just keep the string the way it is because of something…
    ```
    Guild(guildNum).Member(i) = vbNullString
    call saveguild(guildNum)
    ```
    i really can't find anything wrong with my code though so…
    btw if you needed to know saveguild is pretty much saveplayer but for guild and it works fine since the name was saved.
  9. Ok well i have looked into the source many times and i pretty much understand everything exept SendDataTo(i know it sends data  to the client but what kind?)  i don't really get what it does…

    thank you for your time and help
×
×
  • Create New...