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

Arguement Not Optional


gaming ace
 Share

Recommended Posts

Almighty so I made a  source edit where I got rid of the scrolling head, body, legs, on the NewChar.frm where you change the sprites look. Then I deleted all the HS Scroll code segments I could find. However, when I compile the new client I get the error: _Argument Not Optional_ on this segment of code, and the compiler closes. Any help?

      Case MENU_STATE_ADDCHAR
            frmNewChar.Visible = False

            If ConnectToServer Then
                Call SetStatus("Connected. Creating Character…")

            If frmNewChar.optMale.Value Then
                Call SendAddChar(frmNewChar.txtName, 0, frmNewChar.cmbClass.ListIndex, frmChars.lstChars.ListIndex + 1)
            Else
                Call SendAddChar(frmNewChar.txtName, 1, frmNewChar.cmbClass.ListIndex, frmChars.lstChars.ListIndex + 1)
            End If
Link to comment
Share on other sites

Okay, thanks for helping here is the sendaddchar sub. My bad, I just got vb6, so my skills are a work in progress. So, should there not be all of these LegCs and HeadCs?

```
Sub SendAddChar(ByVal Name As String, ByVal Sex As Long, ByVal ClassNum As Long, ByVal slot As Long, ByVal HeadC As Long, ByVal BodyC As Long, ByVal LegC As Long)
    Call SendData("addchar" & SEP_CHAR & Trim$(Name) & SEP_CHAR & Sex & SEP_CHAR & ClassNum & SEP_CHAR & slot & SEP_CHAR & HeadC & SEP_CHAR & BodyC & SEP_CHAR & LegC & END_CHAR)
End Sub
```
Link to comment
Share on other sites

yeah you could just make it all 0 i think

if that doesn't work,

delete the
, ByVal HeadC As Long, ByVal BodyC As Long, ByVal LegC As Long)
and the
& SEP_CHAR & HeadC & SEP_CHAR & BodyC & SEP_CHAR & LegC

and server side find
"addchar"
and delete the head shit there :P
Link to comment
Share on other sites

Alrighty, I know I'm a complete nub at this but I've tried everything to fix this bug here. I deleted all the ByVal HeadC, etc. Then while compiling is give me Compile Errors: _Case Without Select Case_. Here's the sub if you need a look. It highlights the Case MENU_STATE_DELCHAR, when it says Case without Select Case. Thanks again for all this help, I would never be able to do this without ya. At the beginning it says Select Menu State, and I've tried several things to fix, it but…yea lol

```
Sub MenuState(ByVal State As Long)
    Connected = True

    frmSendGetData.Visible = True

    Call SetStatus("Connecting to Server...")

    Select Case State
        Case MENU_STATE_NEWACCOUNT
            frmNewAccount.Visible = False

            If ConnectToServer Then
                Call SetStatus("Connected! Creating Account...")

                If Not frmNewAccount.txtEmail.Visible Then
                    Call SendNewAccount(frmNewAccount.txtName.Text, frmNewAccount.txtPassword.Text, "NOMAIL")
                Else
                    Call SendNewAccount(frmNewAccount.txtName.Text, frmNewAccount.txtPassword.Text, frmNewAccount.txtEmail.Text)
                End If
            End If

        Case MENU_STATE_DELACCOUNT
            frmDeleteAccount.Visible = False

            If ConnectToServer Then
                Call SetStatus("Connected. Deleting Account...")

                Call SendDelAccount(frmDeleteAccount.txtName.Text, frmDeleteAccount.txtPassword.Text)
            End If

        Case MENU_STATE_LOGIN
            frmLogin.Visible = False

            If ConnectToServer Then
                Call SetStatus("Connected. Logging In...")

                Call SendLogin(frmLogin.txtName.Text, frmLogin.txtPassword.Text)
            End If

        Case MENU_STATE_AUTO_LOGIN
            frmMainMenu.Visible = False

            If ConnectToServer Then
                Call SetStatus("Connected. Logging In...")

                Call SendLogin(frmLogin.txtName.Text, frmLogin.txtPassword.Text)
            End If

        Case MENU_STATE_NEWCHAR
            frmChars.Visible = False

            If ConnectToServer Then
                Call SetStatus("Connected. Receiving Classes...")

                If SpriteSize = 1 Then
                    frmNewChar.Picture4.Top = frmNewChar.Picture4.Top - 32
                    frmNewChar.Picture4.Height = 69
                    frmNewChar.picPic.Height = 65
                End If

                Call SendGetClasses
            End If

        Case MENU_STATE_ADDCHAR
            frmNewChar.Visible = False

            If ConnectToServer Then
                Call SetStatus("Connected. Creating Character...")

            If frmNewChar.optMale.Value Then
                Call SendAddChar(frmNewChar.txtName, 0, frmNewChar.cmbClass.ListIndex, frmChars.lstChars.ListIndex + 1)
            Else
                Call SendAddChar(frmNewChar.txtName, 1, frmNewChar.cmbClass.ListIndex, frmChars.lstChars.ListIndex + 1)
            End If

        Case MENU_STATE_DELCHAR
            frmChars.Visible = False

            If ConnectToServer Then
                Call SetStatus("Connected. Deleting Character...")
                Call SendDelChar(frmChars.lstChars.ListIndex + 1)
            End If

        Case MENU_STATE_USECHAR
            frmChars.Visible = False

            If ConnectToServer Then
                Call SetStatus("Connected. Entering " & GAME_NAME & "...")
                Call SendUseChar(frmChars.lstChars.ListIndex + 1)
            End If

    If Not IsConnected And Connected = True Then
        frmSendGetData.Visible = False
        frmMainMenu.Visible = True

        Call MsgBox("The game server is currently offline. Please try to reconnect in a few minutes or visit sky-pirates.co.nr. We apologize for the inconvenience.")
    End If
End Sub
```
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...