Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 1:48 pm

All times are UTC




Post new topic Reply to topic  [ 45 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 12:56 am 
Offline
Regular
User avatar

Joined: Sat Oct 27, 2007 3:42 am
Posts: 26
Location: in a distant memory...
Google Talk: a.azure.night13@gmail.com
Ok, well I'm having a issue. I haven't edited this code at all, and it's still giving me an error. lol

I'm getting the error message that says "Argument Is Not Optional". I've tried everything I could think of, but I just can't get this one.

Code:
Call SendAddChar(frmNewChar.txtName, 0, frmNewChar.cmbClass.ListIndex, frmChars.lstChars.ListIndex + 1)


Tell me if you need more code that is around it.


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 1:27 am 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 03, 2006 8:48 pm
Posts: 172
Location: Naiyo Region
Google Talk: matt.nwachukwu@gmail.com
So, that's the highlighed code?

Uh...

Gimme the SendAddChar sub, please.

_________________
Image
みんな、見ていてくれ!


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 7:03 am 
Offline
Regular
User avatar

Joined: Sat Oct 27, 2007 3:42 am
Posts: 26
Location: in a distant memory...
Google Talk: a.azure.night13@gmail.com
Here is the entire thing. (I think this is what your wanted, right? o.O)

Code:
        Case MENU_STATE_ADDCHAR
            frmNewChar.Visible = False
            If ConnectToServer = True Then
                Call SetStatus("Connected, sending character addition data...")
                If frmNewChar.optMale.Value = True 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
            End If


Thanks for helping me. :D


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 1:22 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
He meant this code:
Code:
Sub SendAddChar(ByVal Name As String, ByVal Sex As Long, ByVal ClassNum As Long, ByVal Slot As Long)
Dim Packet As String

    Packet = "addchar" & SEP_CHAR & Trim(Name) & SEP_CHAR & Sex & SEP_CHAR & ClassNum & SEP_CHAR & Slot & SEP_CHAR & END_CHAR
    Call SendData(Packet)
End Sub


Is it the same as this?

_________________
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: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 1:30 pm 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 03, 2006 8:48 pm
Posts: 172
Location: Naiyo Region
Google Talk: matt.nwachukwu@gmail.com
If it isn't the same as what Dave just posted, I'll have to take a closer look at home.

I'm somewhat, limited, since I'm in school ATM.

But, yeah, Dave, since you know what I'm talking about, do you think it's a problem with the sub?

If it's unchanged, Daemonblade777, then I can't see an immediate problem.

_________________
Image
みんな、見ていてくれ!


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 2:58 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
Probably, yes.

_________________
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: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 8:11 pm 
Offline
Regular
User avatar

Joined: Sat Oct 27, 2007 3:42 am
Posts: 26
Location: in a distant memory...
Google Talk: a.azure.night13@gmail.com
Actually, ya I did change that part that Dave posted. I'm trying to add Race and Alignment to my game...>.>

Code:
Sub SendAddChar(ByVal Name As String, ByVal Sex As Long, ByVal ClassNum As Long, ByVal Slot As Long, ByVal Race As Long, ByVal Alignment As Long)
Dim Packet As String

    Packet = "addchar" & SEP_CHAR & Trim(Name) & SEP_CHAR & Sex & SEP_CHAR & ClassNum & SEP_CHAR & Slot & SEP_CHAR & Race & SEP_CHAR & Alignment & SEP_CHAR & END_CHAR
    Call SendData(Packet)
End Sub


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 9:03 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
Isn't the problem glaringly apparent then?

Compare:

Code:
Sub SendAddChar(ByVal Name As String, ByVal Sex As Long, ByVal ClassNum As Long, ByVal Slot As Long)
Sub SendAddChar(ByVal Name As String, ByVal Sex As Long, ByVal ClassNum As Long, ByVal Slot As Long, ByVal Race As Long, ByVal Alignment As Long)


You're missing two arguments.

_________________
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: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 9:09 pm 
Offline
Regular
User avatar

Joined: Sat Oct 27, 2007 3:42 am
Posts: 26
Location: in a distant memory...
Google Talk: a.azure.night13@gmail.com
I added the "ByVal Race As Long, ByVal Alignment As Long" part already, and it's still giving me the error...>.>


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 10:15 pm 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 03, 2006 8:48 pm
Posts: 172
Location: Naiyo Region
Google Talk: matt.nwachukwu@gmail.com
Add them to where you're calling the sub...

Yeah.

If you're trying to.. Let's say, send a Byte to a sub... But you use Long, it wont work.

Ex..

Code:
Sub Hi(byval x as byte)


You can't use

Code:
Dim g as Long
Call Hi(g)


That also causes the error...

_________________
Image
みんな、見ていてくれ!


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 10:42 pm 
Offline
Regular
User avatar

Joined: Sat Oct 27, 2007 3:42 am
Posts: 26
Location: in a distant memory...
Google Talk: a.azure.night13@gmail.com
Ok, well I fixed that...But now I'm getting a new error.
Code:
Case MENU_STATE_ADDCHAR
            frmNewChar.Visible = False
            If ConnectToServer = True Then
                Call SetStatus("Connected, sending character addition data...")
                If frmNewChar.optMale.Value = True Then
                    Call SendAddChar(frmNewChar.txtName, 0, frmNewChar.cmbClass.ListIndex, frmChars.lstChars.ListIndex, frmNewChar.optBeast.ListIndex, frm.NewChar.optDark.ListIndex + 1)
                Else
                    Call SendAddChar(frmNewChar.txtName, 1, frmNewChar.cmbClass.ListIndex, frmChars.lstChars.ListIndex + 1)
                End If
            End If

The part ".ListIndex" of the ".optBeast" part is the part I'm getting the error of "method or data member not found" on. I've never gotten this error before, so what do it even mean?


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 10:49 pm 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 03, 2006 8:48 pm
Posts: 172
Location: Naiyo Region
Google Talk: matt.nwachukwu@gmail.com
I don't think Option Buttons[radio buttons] have a listindex...

Try...

Code:
Case MENU_STATE_ADDCHAR
            frmNewChar.Visible = False
            If ConnectToServer = True Then
                Call SetStatus("Connected, sending character addition data...")
                If frmNewChar.optMale.Value = True Then
                         If frmNewChar.optBeast.Value = True Then
                              Call SendAddChar(frmNewChar.txtName, 0, frmNewChar.cmbClass.ListIndex, frmChars.lstChars.ListIndex, 1, frm.NewChar.optDark.ListIndex + 1)
                     Else
                         Call SendAddChar(frmNewChar.txtName, 1, frmNewChar.cmbClass.ListIndex, 0, frmNewChar.optDark.ListIndex, frmChars.lstChars.ListIndex + 1)
                End If
            End If


Changes: Taking optBeast and making it affect the ByVal when called in SendAddChar, instead of trying to send something that doesn't exist.

I see frmChars.optDark.ListIndex. Either use real List Boxes, or make If Statements for every such condition. I'd recommend using List Boxes, but if you want to try an If Statement for EVERY possible combination, use Select Case instead. >.>

_________________
Image
みんな、見ていてくれ!


Last edited by Matt2 on Tue Jan 15, 2008 11:05 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 10:54 pm 
Offline
Regular
User avatar

Joined: Sat Oct 27, 2007 3:42 am
Posts: 26
Location: in a distant memory...
Google Talk: a.azure.night13@gmail.com
Now it gave me an error saying that "optBeast" is not defined. o.o I used your code.


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 11:05 pm 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 03, 2006 8:48 pm
Posts: 172
Location: Naiyo Region
Google Talk: matt.nwachukwu@gmail.com
frmNewChar.optBeast.Value

That's what I meant. frmNewChar. Rawr. >.>

_________________
Image
みんな、見ていてくれ!


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 11:12 pm 
Offline
Regular
User avatar

Joined: Sat Oct 27, 2007 3:42 am
Posts: 26
Location: in a distant memory...
Google Talk: a.azure.night13@gmail.com
Lol, ok. Thanks for helping me. I think I got it now. ^.^


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 15, 2008 11:14 pm 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 03, 2006 8:48 pm
Posts: 172
Location: Naiyo Region
Google Talk: matt.nwachukwu@gmail.com
No problem. =D Glad to help.

Anytime. :x

_________________
Image
みんな、見ていてくれ!


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Wed Jan 16, 2008 3:42 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
Now the important part, did you learn?

Or did you just, "use your code"

_________________
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: I'm Confused o.o
PostPosted: Mon Jan 21, 2008 8:04 pm 
Offline
Regular
User avatar

Joined: Sat Oct 27, 2007 3:42 am
Posts: 26
Location: in a distant memory...
Google Talk: a.azure.night13@gmail.com
Sorry it took so long to respond.

But I learned. ^.^ I had to do something like this again, and I didn't have any problems doing it.


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 29, 2008 1:14 pm 
Offline
Knowledgeable
User avatar

Joined: Wed Jul 26, 2006 11:22 pm
Posts: 143
Location: Virginia, USA
You've truly learned it when you can explain it to someone else and they can fully understand what you're talking about.

That being said, I must be a complete idiot. o.o;


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Jan 29, 2008 2:22 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
I think everyone's a complete idiot.


Except for Robin and I!

_________________
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: I'm Confused o.o
PostPosted: Tue Jan 29, 2008 4:38 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Aww thanks Dave. Love you too.

_________________
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: I'm Confused o.o
PostPosted: Tue Jan 29, 2008 5:52 pm 
Offline
Knowledgeable
User avatar

Joined: Wed Jul 26, 2006 11:22 pm
Posts: 143
Location: Virginia, USA
If ignorance was bliss, then the world would be a better place than it is now. :P


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Wed Jan 30, 2008 12:16 am 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 03, 2006 8:48 pm
Posts: 172
Location: Naiyo Region
Google Talk: matt.nwachukwu@gmail.com
Ignorance is bliss until you have to take care of yourself.

Remember that.

_________________
Image
みんな、見ていてくれ!


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Wed Dec 08, 2021 9:58 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489345
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
 Post subject: Re: I'm Confused o.o
PostPosted: Tue Feb 08, 2022 7:48 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 489345
Choo174.5XIIIThisOZONQuelSearDefoGeorHenrJoacAnneWisaSereErnsSieLTracDigiKickRajnBavaContPrep
FeelErleNighWindAudiXVIIABBYJameXVIIDoctDaphCalyFantTeanPolaMARCStudMargOZONLynsOcteDiCiXVII
GrimZoneNadiLisaPeteXVIIMornAlmoJeanXVIIWiimWereMornCompStouXIIIValeGeorShawDougMemeFranNigh
GoldXVIIChriCartTricFastWhitProtBaltFallChriBaldTindZoneRumiJameIntrSwitMasaCrosDrifEricJoha
WilhZoneMultComeJohnZoneLionIntrDeniblacZoneZoneRobeZoneZoneNasoMariBoleZoneBraiGooNGiusXVII
ElizXXIIPontmicrTradWindSeleElecMotoFirsBookJardEscaDonaConcMistFordBeflPerfPROTSideMoreVoca
ValiLoveThessmasKidsVtecAlfaDOHCWindWindBoomViteValeSalvRoyaAescJeweElecJoanConcWindFinaWint
AnciMichGrieXVIIAfteHomeThroElakPirmCryiHeroBriaXVIIPrimOlegGarrYourWorlHitmBetwOstrVeraFant
PaulGaryKiyoHappMPEGthisMoleWindRuthAlleBenqTakeWindJeanFrieEdwaNyneConrAngeWindLongmicrmicr
micrThisHansJuliCarmBeliFerrRuedEnidolimDannDogsSunetuchkasSamuNanc


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 67 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