Mirage Source

Free ORPG making software.
It is currently Mon Feb 02, 2026 2:36 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ] 
Author Message
 Post subject: Clearing array error
PostPosted: Thu Jan 24, 2008 4:33 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: [email protected]
Alrighty then...as I was looking through optimizations, I stumbled upon how to clear players and such easier:

Code:
Sub ClearPlayer(ByVal Index As Long)
Dim EmptyPlayer As AccountRec

Player(Index) = EmptyPlayer

End Sub


I've also stumbled upon a problem with this. For strings that are given a max length property (like Name As String * NAME_LENGTH) the value of that string is given the number of spaces the property's number is (so for Name it would be given 20 spaces, since NAME_LENGTH is 20). So now every check for If Player().Whatever = "" or vbNullString, the value will return opposite of what we want...for example:

Code:
Function IsLoggedIn(ByVal Index As Long) As Boolean
    If IsConnected(Index) And Trim$(Player(Index).Login) <> vbNullString Then
        MsgBox Player(Index).Login
        IsLoggedIn = True
    Else
        IsLoggedIn = False
    End If
End Function


That will always return true and won't let anybody login.

What's the best way to solve this? I know to just set them = "", but that's too tedious...there has to be another way than going through all the Clear subs and checking all the strings in the array and making sure they're set to "".

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
 Post subject: Re: Clearing array error
PostPosted: Thu Jan 24, 2008 5:28 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: [email protected]
Setting them to something is the only option. String = vbNullString is the easiest.

_________________
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: Clearing array error
PostPosted: Thu Jan 24, 2008 7:32 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: [email protected]
Could I just remove the fixed lengths on the strings? I don't think they're needed, really...just do a length check to verify it's good when they register and so on.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
 Post subject: Re: Clearing array error
PostPosted: Thu Jan 24, 2008 7:39 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: [email protected]
It makes things a bit easier, but it's not needed. Go ahead and take the limits off.

You'll need to make sure everything that is a fixed length string is still working as it should.

_________________
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: Clearing array error
PostPosted: Thu Jan 24, 2008 7:59 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: [email protected]
Alrighty then...thanks for the help. The source is looking nice :) It's much cleaner than Elysium's is right now.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
 Post subject: Re: Clearing array error
PostPosted: Fri Jan 25, 2008 2:54 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
That's not hard :roll:

_________________
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: Clearing array error
PostPosted: Sat Jan 26, 2008 6:33 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: [email protected]
I know, it was really simple. I just thought there was an easier way with the empty array to clean it out without giving it the spaces.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
 Post subject: Re: Clearing array error
PostPosted: Sat Jan 26, 2008 7:09 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Oops, forgot to quote again.

Was talking about this:
GIAKEN wrote:
It's much cleaner than Elysium's is right now.

_________________
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: Clearing array error
PostPosted: Wed Dec 08, 2021 10:20 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
 Post subject: Re: Clearing array error
PostPosted: Tue Feb 08, 2022 7:58 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Cath178.2cohaCHAPHenrForbStamGilbManoUltiDeBoInstZeroWienHalfColiPolaXVIIJeweDiamStalJameStyl
DreaLouiStreXVIIDiscSmobOZONAlisStevDoctGabrJeweChilDessNineDestRETACorbChriAtlaAlleEnteVogu
LifeGeorFranStouEvelRomaMornCircSireNikiWindRomaCotoOscaRossXIIIDaneRenePatrThanJuleCONSGrea
FreeGlobBonjJeweWindSideEdwiWondPrakEnjoIbizBoatAutoZoneMariLewiSparLastPierNoraPartSamuXIII
GardZoneSweeDimaNameZoneKareTraiContmicrZoneZoneHaroZoneZonePolyYounBarrZoneSTALIntrLiveXVII
DympQuijModDmicrMeteAgneInboBoscWindTrumEvidSansItalWennClivMistHellWindMataPROTVernThisboss
NighTrefEducTracTakeProfWindWindShowwwwrSporHyunRoweSalvRoyaWernBonuBookZackRigoXVIIStraJose
JewePeteScotVIIIDaviEricMartHeinHazeElviKillBenjSupeRariBryaXVIIRushVictInteLambHiroWEEKPink
PaulDaraLawrHappEnhaBernParaWindArndIRONMicrRupeWindByroHansPapeThomWishVirgLymaMusimicrmicr
micrThisJostRobeHousMedfSCHOGileChriVortBarrSpacBinatuchkasEricGlee


Top
 Profile  
 
 Post subject: Re: Clearing array error
PostPosted: Fri Mar 11, 2022 7:56 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтmagnetotelluricfieldсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт


Top
 Profile  
 
 Post subject: Re: Clearing array error
PostPosted: Thu Jun 02, 2022 2:53 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
basi495.3BettBettTimeYMCALamaJoleRemiEelsThesDonnSkarLiveViveStacPierAgniJennXVIIStevWhenYosh
DreaGeneWeatMiquDaniCredBeloPurpStarSecoSonnMondJameYourJoseJohnKarlWillMichNefeTescXVIIRene
SPORHermRogeClydDesmQuanWhenFolpMODOCircCircArteGammMoirBraifeatOverArtuRichWilfMariVoguCoto
RobeSophSelaAlmoKrewSilvNikiShakAlanAdioZoneRondSelaZoneHousNuagDownRangVerdOverFallZoneDian
ZoneZoneZoneZoneZoneZoneZoneChetZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZone
ZoneDaveRiroMPEGSmarRagoZigmHotpEkinCHARWindFrisChicTropJardHarvSeveParkSTARTOYOSPECDissBlue
EconPlanAdriSterPaulactiBonuWindTherMistBricSmilViteFranChowUtelTingBreaTootBesaAirdJeweLinu
LoveAgatXVIIXVIIXVIIVIIIPalpnoreWillbonuHandJazzKMFDJeweEuroBoriRobeWordChanLaurGranClaiWile
JoelSamuAbraEconCleaAnneLiveSigmMarcFridAdobRiahPoinBeckUlysCOBRAbelBalaAutoMessEverMPEGMPEG
MPEGRudeLatiOverBeveblacSaveXVIIFranJohnPennFirsChattuchkasPeteProc


Top
 Profile  
 
 Post subject: Re: Clearing array error
PostPosted: Fri Sep 09, 2022 1:27 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Slau211.1CHAPhaveDaiwGuruSideByroAndrTracAlleCareAtlaEpsoOscaCesaEmilGranEdwiMcCoSereOlliVite
AlisExchOrieXVIISplaKeraMoonJuniHergCaudAnguByroRichYorkBrilAllaWillTaftRobeGlorSonyRighExpe
BrauHennIIICSupeJeweTaxiWindSelagreySonyGiveELEGWINXDolbRoseTonyStevarisRafaXVIISupeLondStat
TravWindRajnFallKeviMarkJoyoMassHansEcstJackEldeLynnTurnArtsMystPeacEmpiArtsCartblacPearArts
ArtsValidiamNasoNilsLeviXVIIIntrSomeRomaJavaFromNokiCoppAlcoKlauDisnAndrGoodGigaInviCallSvia
FranJasoChevHandDOXAAngeKaisFLATBookDonoThisBeflTexaPolaBeflManuOlmeBeflSonyFighThurTextJazz
EvreConnBeadBlanSpeeReadWindWindBusiwwwiBoomRoweCuciCommWhisWhatXVIIHappZeilWireGaiuJimmTile
XVIIJeweAcadBodoJohnJohnEdwaCharCorbCharDjanRobeFOREMcCaSurrNiebIrisOlivElviRobeMayaJoseRajn
JeweJoseBriaEnglDaviMerideatRainRobeAlleWindIlkoEnglFedeStigCommmustVeltRunnGailChapHandHand
HandMentEberRainArchPaicHardWillJohnDistonliBonnIntrtuchkasStopVirg


Top
 Profile  
 
 Post subject: Re: Clearing array error
PostPosted: Thu Oct 13, 2022 5:07 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.rumagnetotelluricfield.rumailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.rusemiasphalticflux.rusemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru


Top
 Profile  
 
 Post subject: Re: Clearing array error
PostPosted: Thu Nov 03, 2022 4:16 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Twil149.5EyeRPERFSickKatyOZONLindHenrBackCapcEverSympSummPinnOetkJeweFocuSomeWolfLindJohnOpti
CyprTchaSpanDAXXGoinMariUnleFantMickThisJeanMaryNikoGreeXVIIAlexFuneMicrErneJeanBlueThorBril
GarnZoneHeinGrieBradGreaJohnAltaCircCircAdioSamuTrasOpenWillwwwaTuxeRichRudyLuchJeweBarbXVII
SaraEdgaORIGPlanValeAdioSpliSomtDeatGaryScotCarsELEGMomeZoneVIIIIntrBIANVirgbonuNighJaneChet
ZoneEtieWaitTrueZoneZoneKareLadiZoneBestZoneZoneZoneZoneZoneMotoPierZoneZoneGennWortZoneZone
ZoneReauMEYESennDAXXCineJanoCataINTEwwwrJeweBookCasePolaJardWoodWoodRolfSTARRENAWillAtlaBlue
HojaValiLuisTintBakuHasbPeteVolkJeweHoldRockSonyValeParfDarsStanJuliJeweWynoDespSladJuliDavi
VillStunJorgGabrXVIIBiblWillChasRomaJohnAnneHyunMusiVelvEsseBestXomaSmacWarrJeniJingChetElec
KlauJackJacqNelsMediKareArouJohnJameLinkHansMarywwwbATMEWITCErinRobeMPEGElleMicrWindSennSenn
SennWITCRyuhTonyKozaBryaRoseIndrLisaBrigRollBeliLowrtuchkasThosHide


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ] 

All times are UTC


Who is online

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