Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 6:49 pm

All times are UTC




Post new topic Reply to topic  [ 52 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: My Race System
PostPosted: Sun Sep 14, 2008 5:09 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Well I basically copied the Class system & modified it so it's Races instead. But I don't know how to make it so it says the Race on the Character Selection Screen. & For some reason I am now unable to login.(Should be too do with the Race system?)

Here's the whole Race script:

CLIENTSIDE
Code:
--- modClientTCP ---
Sub SendAddChar(ByVal Name As String, ByVal Sex As Long, ByVal ClassNum As Long, ByVal Slot As Long) ' ByVal RaceNum As Long) Unblock this & I get errors
Dim Packet As String

    Packet = CAddChar & SEP_CHAR & Trim$(Name) & SEP_CHAR & Sex & SEP_CHAR & ClassNum & SEP_CHAR & Slot & END_CHAR ' & SEP_CHAR & RaceNum & END_CHAR Unblock this & I get errors
    Call SendData(Packet)
End Sub

Sub SendGetRaces()
Dim Packet As String

    Packet = CGetRaces & END_CHAR
    Call SendData(Packet)
End Sub

Public Sub SendSaveSpell(ByVal SpellNum As Long)
Dim Packet As String

    With Spell(SpellNum)
        Packet = CSaveSpell & SEP_CHAR & SpellNum & SEP_CHAR & Trim$(.Name) & SEP_CHAR & .ClassReq & SEP_CHAR & .RaceReq & SEP_CHAR & .LevelReq & SEP_CHAR & .Type & SEP_CHAR & .Data1 & SEP_CHAR & .Data2 & SEP_CHAR & .Data3 & END_CHAR
    End With
   
    Call SendData(Packet)
End Sub


Code:
--- modDatabase ---
Function GetPlayerRace(ByVal Index As Long) As Long
    GetPlayerRace = Player(Index).Race
End Function

Sub SetPlayerRace(ByVal Index As Long, ByVal RaceNum As Long)
    Player(Index).Race = RaceNum
End Sub


Code:
--- modEnumerations ---
CGetRaces


Code:
--- modGameEditors ---
Public Sub SpellEditorInit()
Dim i As Long

    frmSpellEditor.cmbClassReq.AddItem "All Classes"
    For i = 1 To Max_Classes
        frmSpellEditor.cmbClassReq.AddItem Trim$(Class(i).Name)
    Next i
   
    frmSpellEditor.cmbRaceReq.AddItem "All Races"
    For i = 1 To Max_Races
        frmSpellEditor.cmbRaceReq.AddItem Trim$(Race(i).Name)
    Next i
   
    frmSpellEditor.txtName.Text = Trim$(Spell(EditorIndex).Name)
    frmSpellEditor.cmbClassReq.ListIndex = Spell(EditorIndex).ClassReq
    frmSpellEditor.cmbRaceReq.ListIndex = Spell(EditorIndex).RaceReq
    frmSpellEditor.scrlLevelReq.Value = Spell(EditorIndex).LevelReq
       
    frmSpellEditor.cmbType.ListIndex = Spell(EditorIndex).Type
    If Spell(EditorIndex).Type <> SPELL_TYPE_GIVEITEM Then
        frmSpellEditor.fraVitals.Visible = True
        frmSpellEditor.fraGiveItem.Visible = False
        frmSpellEditor.scrlVitalMod.Value = Spell(EditorIndex).Data1
    Else
        frmSpellEditor.fraVitals.Visible = False
        frmSpellEditor.fraGiveItem.Visible = True
        frmSpellEditor.scrlItemNum.Value = Spell(EditorIndex).Data1
        frmSpellEditor.scrlItemValue.Value = Spell(EditorIndex).Data2
    End If
       
    frmSpellEditor.Show vbModal
End Sub

Public Sub SpellEditorOk()
    Spell(EditorIndex).Name = frmSpellEditor.txtName.Text
    Spell(EditorIndex).ClassReq = frmSpellEditor.cmbClassReq.ListIndex
    Spell(EditorIndex).RaceReq = frmSpellEditor.cmbRaceReq.ListIndex
    Spell(EditorIndex).LevelReq = frmSpellEditor.scrlLevelReq.Value
    Spell(EditorIndex).Type = frmSpellEditor.cmbType.ListIndex
    If Spell(EditorIndex).Type <> SPELL_TYPE_GIVEITEM Then
        Spell(EditorIndex).Data1 = frmSpellEditor.scrlVitalMod.Value
    Else
        Spell(EditorIndex).Data1 = frmSpellEditor.scrlItemNum.Value
        Spell(EditorIndex).Data2 = frmSpellEditor.scrlItemValue.Value
    End If
    Spell(EditorIndex).Data3 = 0
   
    Call SendSaveSpell(EditorIndex)
    InSpellEditor = False
    Unload frmSpellEditor
End Sub


Code:
--- modGlobals ---
' Maximum races
Public Max_Races As Byte


Code:
--- modHandleData ---
        ' :::::::::::::::::::::::::::::::::::::::
        ' ::  New character races data packet  ::
        ' :::::::::::::::::::::::::::::::::::::::
        Case "newcharraces"
            n = 1
           
            ' Max races
            Max_Races = Val(Parse(n))
            ReDim Race(1 To Max_Races) As RaceRec

            n = n + 1

            For i = 1 To Max_Races
                Race(i).Name = Parse(n)
               
                n = n + 1
            Next i
           
            ' Used for if the player is creating a new character
            frmNewChar.Visible = True
            frmSendGetData.Visible = False
   
            frmNewChar.cmbRace.Clear
   
            For i = 1 To Max_Races
                frmNewChar.cmbRace.AddItem Trim$(Race(i).Name)
            Next i
               

            frmNewChar.cmbRace.ListIndex = 0
           
            n = frmNewChar.cmbRace.ListIndex + 1
           
            Exit Sub
       
        ' :::::::::::::::::::::::::
        ' ::  Races data packet  ::
        ' :::::::::::::::::::::::::
        Case "racesdata"
            n = 1
           
            ' Max races
            Max_Races = Val(Parse(n))
            ReDim Race(1 To Max_Races) As RaceRec
           
            n = n + 1
           
            For i = 1 To Max_Races
                Race(i).Name = Parse(n)
               
                n = n + 1
            Next i
            Exit Sub

        Case "editspell"
            n = Val(Parse(1))
           
            ' Update the spell
            Spell(n).Name = Parse(2)
            Spell(n).ClassReq = Val(Parse(3))
            Spell(n).LevelReq = Val(Parse(4))
            Spell(n).Type = Val(Parse(5))
            Spell(n).Data1 = Val(Parse(6))
            Spell(n).Data2 = Val(Parse(7))
            Spell(n).Data3 = Val(Parse(8))
            Spell(n).RaceReq = Val(Parse(9))
                           
            ' Initialize the spell editor
            Call SpellEditorInit
   
            Exit Sub



Code:
--- modTypes---
Public Race() As RaceRec

Type PlayerRec
    ' General
    Name As String * NAME_LENGTH
    Class As Byte
    Race As Byte
    Sprite As Integer
    Level As Byte
    Exp As Long
    Access As Byte
    PK As Byte

Type RaceRec
    Name As String * NAME_LENGTH
End Type

Type SpellRec
    Name As String * NAME_LENGTH
    ClassReq As Byte
    RaceReq As Byte
    LevelReq As Byte
    Type As Byte
    Data1 As Integer
    Data2 As Integer
    Data3 As Integer
End Type


SERVERSIDE

Code:
--- modDatabase ---
Sub AddChar(ByVal Index As Long, ByVal Name As String, ByVal Sex As Byte, ByVal ClassNum As Byte, ByVal CharNum As Long, ByVal RaceNum As Byte)
Dim f As Long
Dim n As Long

    If LenB(Trim$(Player(Index).Char(CharNum).Name)) = 0 Then
        TempPlayer(Index).CharNum = CharNum
       
        Player(Index).Char(CharNum).Name = Name
        Player(Index).Char(CharNum).Sex = Sex
        Player(Index).Char(CharNum).Class = ClassNum
        Player(Index).Char(CharNum).Race = RaceNum
       
        If Player(Index).Char(CharNum).Sex = SEX_MALE Then
            Player(Index).Char(CharNum).Sprite = Class(ClassNum).Sprite
        Else
            Player(Index).Char(CharNum).Sprite = Class(ClassNum).Sprite
        End If
       
        Player(Index).Char(CharNum).Level = 1

        For n = 1 To Stats.Stat_Count - 1
            Player(Index).Char(CharNum).Stat(n) = Class(ClassNum).Stat(n)
        Next n
       
        Player(Index).Char(CharNum).Map = START_MAP
        Player(Index).Char(CharNum).x = START_X
        Player(Index).Char(CharNum).y = START_Y
           
        Player(Index).Char(CharNum).Vital(Vitals.HP) = GetPlayerMaxVital(Index, Vitals.HP)
        Player(Index).Char(CharNum).Vital(Vitals.MP) = GetPlayerMaxVital(Index, Vitals.MP)
        Player(Index).Char(CharNum).Vital(Vitals.SP) = GetPlayerMaxVital(Index, Vitals.SP)
               
        ' Append name to file
        f = FreeFile
        Open App.Path & "\accounts\charlist.txt" For Append As #f
            Print #f, Name
        Close #f
       
        Call SavePlayer(Index)
           
        Exit Sub
    End If
End Sub

' *************
' **  Races  **
' *************

Public Sub CreateRacesINI()
Dim FileName As String
Dim File As String

    FileName = App.Path & "\data\races.ini"
   
    Max_Races = 4
   
    If Not FileExist(FileName, True) Then
        File = FreeFile
   
        Open FileName For Output As File
            Print #File, "[INIT]"
            Print #File, "MaxRaces=" & Max_Races
        Close File
    End If

End Sub

Sub LoadRaces()
Dim FileName As String
Dim i As Long

    If CheckRaces Then
        ReDim Race(1 To Max_Races) As RaceRec
        Call SaveRaces
    Else
        FileName = App.Path & "\data\races.ini"
        Max_Races = Val(GetVar(FileName, "INIT", "MaxRaces"))
        ReDim Race(1 To Max_Races) As RaceRec
       
    End If
   
    Call ClearRaces
   
    For i = 1 To Max_Races
        Race(i).Name = GetVar(FileName, "RACE" & i, "Name")
    Next i
End Sub

Sub SaveRaces()
Dim FileName As String
Dim i As Long

    FileName = App.Path & "\data\races.ini"
   
    For i = 1 To Max_Races
        Call PutVar(FileName, "RACE" & i, "Name", Trim$(Race(i).Name))
    Next i
End Sub

Function CheckRaces() As Boolean
Dim FileName As String

    FileName = App.Path & "\data\races.ini"

    CheckRaces = False

    If Not FileExist(FileName, True) Then
        Call CreateRacesINI
        CheckRaces = True
    End If

End Function



Code:
--- modEnumerations ---
CGetRaces


Code:
--- modGameLogic ---
Sub JoinGame(ByVal Index As Long)
Dim i As Long

    ' Set the flag so we know the person is in the game
    TempPlayer(Index).InGame = True
       
    ' Send a global message that he/she joined
    If GetPlayerAccess(Index) <= ADMIN_MONITER Then
        Call GlobalMsg(GetPlayerName(Index) & " has joined " & GAME_NAME & "!", JoinLeftColor)
    Else
        Call GlobalMsg(GetPlayerName(Index) & " has joined " & GAME_NAME & "!", White)
    End If

    'Update the log
    frmServer.lvwInfo.ListItems(Index).SubItems(1) = GetPlayerIP(Index)
    frmServer.lvwInfo.ListItems(Index).SubItems(2) = GetPlayerLogin(Index)
    frmServer.lvwInfo.ListItems(Index).SubItems(3) = GetPlayerName(Index)
       
    ' Send an ok to client to start receiving in game data
    Call SendDataTo(Index, "loginok" & SEP_CHAR & Index & END_CHAR)
       
    ' Send some more little goodies, no need to explain these
    Call CheckEquippedItems(Index)
    Call SendClasses(Index)
    Call SendRaces(Index)
    Call SendItems(Index)
    Call SendNpcs(Index)
    Call SendShops(Index)
    Call SendSpells(Index)
    Call SendInventory(Index)
    Call SendWornEquipment(Index)
    For i = 1 To Vitals.Vital_Count - 1
        Call SendVital(Index, i)
    Next i
    Call SendStats(Index)
   
    ' Warp the player to his saved location
    Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))
           
    ' Send welcome messages
    Call SendWelcome(Index)

    ' Send the flag so they know they can start doing stuff
    Call SendDataTo(Index, "ingame" & END_CHAR)
End Sub

Sub ClearRaces()
Dim i As Long

    For i = 1 To Max_Races
        Call ZeroMemory(ByVal VarPtr(Race(i)), LenB(Race(i)))
        Race(i).Name = vbNullString
    Next i
End Sub

Sub ClearPlayer(ByVal Index As Long)
    Call ZeroMemory(ByVal VarPtr(Player(Index)), LenB(Player(Index)))

    Player(Index).Login = vbNullString
    Player(Index).Password = vbNullString
    TempPlayer(Index).Buffer = vbNullString
   
    Dim i As Byte
    For i = 0 To MAX_CHARS
        Player(Index).Char(i).Name = vbNullString
        Player(Index).Char(i).Class = 1
        Player(Index).Char(i).Race = 2
    Next i
   
    frmServer.lvwInfo.ListItems(Index).SubItems(1) = vbNullString
    frmServer.lvwInfo.ListItems(Index).SubItems(2) = vbNullString
    frmServer.lvwInfo.ListItems(Index).SubItems(3) = vbNullString
End Sub

Sub ClearChar(ByVal Index As Long, ByVal CharNum As Long)
    Call ZeroMemory(ByVal VarPtr(Player(Index).Char(CharNum)), LenB(Player(Index).Char(CharNum)))
    Player(Index).Char(CharNum).Name = vbNullString
    Player(Index).Char(CharNum).Class = 1
    Player(Index).Char(CharNum).Race = 2
End Sub

Function GetPlayerRace(ByVal Index As Long) As Long
    GetPlayerRace = Player(Index).Char(TempPlayer(Index).CharNum).Race
End Function

Sub SetPlayerRace(ByVal Index As Long, ByVal RaceNum As Long)
    Player(Index).Char(TempPlayer(Index).CharNum).Race = RaceNum
End Sub

Function GetRaceName(ByVal RaceNum As Long) As String
    GetRaceName = Trim$(Race(RaceNum).Name)
End Function


Code:
--- modGeneral ---
    Call SetStatus("Loading races...")
    Call LoadRaces


Code:
--- modGlobals ---
' Maximum races
Public Max_Races As Byte


Code:
--- modHandleData ---
Dim Race As Long

        ' :::::::::::::::::::::::::::::::::::::::::::::::
        ' ::  Requesting races for making a character  ::
        ' :::::::::::::::::::::::::::::::::::::::::::::::
        Case CGetRaces
            If Not IsPlaying(Index) Then
                Call SendNewCharRaces(Index)
            End If
            Exit Sub

        Case CAddChar
            If Not IsPlaying(Index) Then
                Name = Parse(1)
                Sex = Val(Parse(2))
                Class = Val(Parse(3))
                CharNum = Val(Parse(4))
                Race = Val(Parse(4))

                ' Everything went ok, add the character
                Call AddChar(Index, Name, Sex, Class, CharNum, Race)
                Call AddLog("Character " & Name & " added to " & GetPlayerLogin(Index) & "'s account.", PLAYER_LOG)
                Call AlertMsg(Index, "Character has been created!")
            End If
            Exit Sub

                        If n > 0 Then
                            ' Make sure they are the right class
                                If Spell(n).ClassReq - 1 = GetPlayerClass(Index) Or Spell(n).ClassReq = 0 Then
                                    ' Make sure they are the right level
                                    ' Make sure they are the right race
                                    If Spell(n).RaceReq - 1 = GetPlayerRace(Index) Or Spell(n).RaceReq = 0 Then
                                        ' Make sure they are the right level
                                        i = GetSpellReqLevel(n)
                               
                                        If i <= GetPlayerLevel(Index) Then
                                            i = FindOpenSpellSlot(Index)
                                   
                                            ' Make sure they have an open spell slot
                                            If i > 0 Then
                                                ' Make sure they dont already have the spell
                                                If Not HasSpell(Index, n) Then
                                                    Call SetPlayerSpell(Index, i, n)
                                                    Call TakeItem(Index, GetPlayerInvItemNum(Index, InvNum), 0)
                                                    Call PlayerMsg(Index, "You study the spell carefully...", Yellow)
                                                    Call PlayerMsg(Index, "You have learned a new spell!", White)
                                                Else
                                                    Call TakeItem(Index, GetPlayerInvItemNum(Index, InvNum), 0)
                                                    Call PlayerMsg(Index, "You have already learned this spell!  The spells crumbles into dust.", BrightRed)
                                                End If
                                            Else
                                                Call PlayerMsg(Index, "You have learned all that you can learn!", BrightRed)
                                            End If
                                        Else
                                            Call PlayerMsg(Index, "You must be level " & i & " to learn this spell.", White)
                                        End If
                                    Else
                                        Call PlayerMsg(Index, "This spell can only be learned by a " & GetRaceName(Spell(n).RaceReq - 1) & ".", White)
                                    End If
                                Else
                                    Call PlayerMsg(Index, "This spell can only be learned by a " & GetClassName(Spell(n).ClassReq - 1) & ".", White)
                                End If
                            Else
                                Call PlayerMsg(Index, "This scroll is not connected to a spell, please inform an admin!", White)
                            End If
                       
        End Select
        End If
        Exit Sub

            ' Update the spell
            Spell(n).Name = Parse(2)
            Spell(n).ClassReq = Val(Parse(3))
            Spell(n).LevelReq = Val(Parse(4))
            Spell(n).Type = Val(Parse(5))
            Spell(n).Data1 = Val(Parse(6))
            Spell(n).Data2 = Val(Parse(7))
            Spell(n).Data3 = Val(Parse(8))
            Spell(n).RaceReq = Val(Parse(9))


Code:
--- modServerTCP ---
Sub SendChars(ByVal Index As Long)
Dim Packet As String
Dim i As Long
   
    Packet = "allchars"
    For i = 1 To MAX_CHARS
        Packet = Packet & SEP_CHAR & 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 & Player(Index).Char(i).Race
    Next i
   
    Packet = Packet & END_CHAR
   
    Call SendDataTo(Index, Packet)
End Sub

Sub SendRaces(ByVal Index As Long)
Dim Packet As String
Dim i As Long

    Packet = "racesdata" & SEP_CHAR & Max_Races
    For i = 1 To Max_Races
        Packet = Packet & SEP_CHAR & GetRaceName(i)
    Next i
    Packet = Packet & END_CHAR
   
    Call SendDataTo(Index, Packet)
End Sub

Sub SendNewCharRaces(ByVal Index As Long)
Dim Packet As String
Dim i As Long

    Packet = "newcharraces" & SEP_CHAR & Max_Races
    For i = 1 To Max_Races
        Packet = Packet & SEP_CHAR & GetRaceName(i)
    Next i
    Packet = Packet & END_CHAR
   
    Call SendDataTo(Index, Packet)
End Sub

Sub SendEditSpellTo(ByVal Index As Long, ByVal SpellNum As Long)
Dim Packet As String

    Packet = "editspell" & SEP_CHAR & SpellNum & SEP_CHAR & Trim$(Spell(SpellNum).Name) & SEP_CHAR & Spell(SpellNum).ClassReq & SEP_CHAR & Spell(SpellNum).LevelReq & SEP_CHAR & Spell(SpellNum).Type & SEP_CHAR & Spell(SpellNum).Data1 & SEP_CHAR & Spell(SpellNum).Data2 & SEP_CHAR & Spell(SpellNum).Data3 & SEP_CHAR & Spell(SpellNum).RaceReq & END_CHAR
    Call SendDataTo(Index, Packet)
End Sub

Sub SendTrade(ByVal Index As Long, ByVal ShopNum As Long)
Dim Packet As String
Dim i As Long, x As Long, y As Long, z As Long

    Packet = "trade" & SEP_CHAR & ShopNum & SEP_CHAR & Shop(ShopNum).FixesItems
    For i = 1 To MAX_TRADES
        Packet = Packet & SEP_CHAR & Shop(ShopNum).TradeItem(i).GiveItem & SEP_CHAR & Shop(ShopNum).TradeItem(i).GiveValue & SEP_CHAR & Shop(ShopNum).TradeItem(i).GetItem & SEP_CHAR & Shop(ShopNum).TradeItem(i).GetValue
       
        ' Item #
        x = Shop(ShopNum).TradeItem(i).GetItem
       
        If Item(x).Type = ITEM_TYPE_SPELL Then
            ' Spell class requirement
            y = Spell(Item(x).Data1).ClassReq
            ' Spell race requirement
            z = Spell(Item(x).Data1).RaceReq
           
            If y = 0 Then
                Call PlayerMsg(Index, Trim$(Item(x).Name) & " can be used by all classes.", Yellow)
            Else
                Call PlayerMsg(Index, Trim$(Item(x).Name) & " can only be used by a " & GetClassName(y - 1) & ".", Yellow)
            End If
           
            If z = 0 Then
                Call PlayerMsg(Index, Trim$(Item(x).Name) & " can be used by all races.", Yellow)
            Else
                Call PlayerMsg(Index, Trim$(Item(x).Name) & " can only be used by a " & GetRaceName(y - 1) & ".", Yellow)
            End If
        End If
    Next i
    Packet = Packet & END_CHAR
   
    Call SendDataTo(Index, Packet)
End Sub


Code:
--- modTypes ---
Public Race() As RaceRec

Type PlayerRec
    ' General
    Name As String * NAME_LENGTH
    Sex As Byte
    Class As Byte
    Race As Byte
    Sprite As Integer
    Level As Byte
    Exp As Long
    Access As Byte
    PK As Byte

Type RaceRec
    Name As String * NAME_LENGTH
End Type

Type SpellRec
    Name As String * NAME_LENGTH
    ClassReq As Byte
    RaceReq As Byte
    LevelReq As Byte
    Type As Byte
    Data1 As Integer
    Data2 As Integer
    Data3 As Integer
End Type


Code:
--- races.ini ---
[INIT]
MaxRaces=4
[RACE1]
Name=Man
[RACE2]
Name=Elf
[RACE3]
Name=Dwarf
[RACE4]
Name=Halfling


I also want to know how to increase the Max Characters. I change the Constants from 3 to 5, but I get errors. Please help. This is pretty messy, yep. :S

If ya need to know more, ask.

ERRORS:
1. Try to Login to the actual game:
Quote:
Run-time error '9':
Subscript out of range

"Class(i).Stat(Stats.Defense) = Val(Parse(n + 6))" is highlighted in "Case "classesdata"" in "modHandleData".

PICTURES:
Image
Image


Last edited by Mattyw on Sun Sep 14, 2008 6:36 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sun Sep 14, 2008 5:14 pm 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
its also the 2 lines below that one \=

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sun Sep 14, 2008 7:20 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Anyone? :S


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sun Sep 14, 2008 10:02 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Surprisingly, people aren't going to keep refreshing the page.

Ask once, don't bump your topic. This forum isn't active enough for that.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sun Sep 14, 2008 10:42 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Robin wrote:
Surprisingly, people aren't going to keep refreshing the page.

Ask once, don't bump your topic. This forum isn't active enough for that.


Sorry. :S It's just annoying not being able to login.


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Thu Sep 18, 2008 12:13 am 
Offline
Newbie
User avatar

Joined: Fri Sep 12, 2008 9:36 pm
Posts: 12
Location: California Bay Area
Google Talk: Slackoff
I know I am new here but I think I know how to fix this one.

I will test this when I get home right now I am at work Should be posting what I find hope you dont mind waiting little bit longer for me to test it. I am also adding in a Race Selection into my Version.


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Thu Sep 18, 2008 12:27 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
dont bump every 2 hours anyways, give it 24 before bumping.

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Thu Sep 18, 2008 3:35 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Well due to the compiling issue in Bugs forum, can't compile it anyway. :S


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Thu Sep 18, 2008 7:38 pm 
Offline
Newbie
User avatar

Joined: Fri Sep 12, 2008 9:36 pm
Posts: 12
Location: California Bay Area
Google Talk: Slackoff
I have a question.

The race box did you get that to populate Normal or did you have to do addItem to get the Information in there.

If I think of more I will edit this post here.


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Thu Sep 18, 2008 7:53 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Well Class one is "cmbClass" as Text, Race is "cmbRace".

:S Still also got compiling issues due to Key 2 Heaven. >.>


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Thu Sep 18, 2008 8:54 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
im not going to read a whole long code listing,

But check packet communication. Start up the debugger and find where it fails, then we can help.

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Thu Sep 18, 2008 8:57 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
I'd start it, problem is K2H screwed my VB6 over. Re-registered all the files, but still issues. >.>


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Thu Sep 18, 2008 9:05 pm 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
How does K2H have anything to do with your VB6 screwing up?

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Thu Sep 18, 2008 9:11 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Sonire wrote:
How does K2H have anything to do with your VB6 screwing up?



Downloaded K2H, registered files, VB6 screwed, re-registered with old files, still won't work.


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Thu Sep 18, 2008 9:26 pm 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
Just reinstall VB6. I've had to do it recently because CodeSmart fucked it up.

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Thu Sep 18, 2008 9:31 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
Ok. :S

EDIT: Still same issues after re-installing...


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sat Sep 20, 2008 4:41 am 
Offline
Newbie
User avatar

Joined: Fri Sep 12, 2008 9:36 pm
Posts: 12
Location: California Bay Area
Google Talk: Slackoff
Code:
Sub SendChars(ByVal Index As Long)
Dim Packet As String
Dim i As Long
   
    Packet = "allchars"
    For i = 1 To MAX_CHARS                                                                                                                          ' Race System Addition
        Packet = Packet & SEP_CHAR & Trim$(Player(Index).Char(i).Name) & SEP_CHAR & Trim$(Class(Player(Index).Char(i).Class).Name) & SEP_CHAR & Player(Index).Char(i).Race & SEP_CHAR & Player(Index).Char(i).Level ' Error in Code
    Next i
   
    Packet = Packet & END_CHAR
   
    Call SendDataTo(Index, Packet)
End Sub




The Packet Part when you look it up in the debugger it shows the Trim$(Player(Index).Char(i).Name) as dmin and spaces then the SEP_CHAR so I am trying to track down where it removes the Starting a in the admin.

After that it doesnt have the Class Name it says it is out of bounds and it pulls up the Race/Level As numbs 4 and 0.

Note - I did rewrite the code and changed it around little bit then what you have here. Now I can create a new user and you get another issues.

The issue is with this you can make a new account but when you log into it you get a Run Time Error 13

It is under the Case mark of AllChars
Code:
Level = CLng(Parse(n + 2))

This Comes out to being Knight but gives an error called Missmatch. Any help would be welcomed till then Looks like I am going to be having some fun Figuring out where the Issues with the Parsing is located.


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sat Sep 20, 2008 10:10 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Sounds like William uses some shitty .dll hi-jacking.

Just download all your library files again, copy them into System32 and register them.

William, if you're registering people's .dll files, don't. If you aren't, then sorry please dont ban me or ill have no where to go thanks. ;-;

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sat Sep 20, 2008 10:12 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Whaat? :twisted: Why did my name pop up here? xD

I'm not reading the whole topic...

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sat Sep 20, 2008 10:14 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Haha, his blaming k2h for screwing with his compiling problems.. Nice Mattyw, you obviously have no idea what your talking about. Wouldn't surprise me if you have virus program running on your computer, and when you detected 10troyans, you pressed DELETE 10 dlls...

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sat Sep 20, 2008 10:15 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
He's blaming it on K2H changing his registered .dll files.

Do you automatically register them in K2H?

If you do, and someone deletes your game, it'll fuck up their dependencies and make it so they can't compile. Most Eclipse games do it to me xD

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sat Sep 20, 2008 10:17 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
I'm not using anything like that, and it's not my fault. Just write regsvr32 in Start->Run->filename.crap

Just download the files that they are saying your missing.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sat Sep 20, 2008 10:18 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Right, was just checking.

One more post and you have 2500 :D

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sat Sep 20, 2008 10:19 am 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Argh, I need to be first at 5000 somehow.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject: Re: My Race System
PostPosted: Sat Sep 20, 2008 10:44 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Admin abuse tbh?

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 52 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 60 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:  
Powered by phpBB® Forum Software © phpBB Group