Mirage Source
http://web.miragesource.net/forums/

Subscript out of Range
http://web.miragesource.net/forums/viewtopic.php?f=201&t=4011
Page 1 of 1

Author:  Avalonia [ Sun Jul 20, 2008 6:46 am ]
Post subject:  Subscript out of Range

Want to pass the size variable (used for sprite sizes) wich is a byte to the BltNPC function so i can choose between a few sizes when bliting and blit different if its an other size.

Code:
Dim sizez as Integer
Dim i as Long

        ' Blit out the npcs
        For i = 1 To MAX_MAP_NPCS
            sizez = Npc(MapNpc(i).Num).Size
            Call BltNpc(i, nnum)
        Next i


Code:
sizez = Npc(MapNpc(i).Num).Size ' Subscript out of range error here
returns subscript out of range

Author:  GIAKEN [ Sun Jul 20, 2008 6:51 am ]
Post subject:  Re: Subscript out of Range

Check if the MapNpc(i).Num > 0 before using it.

Author:  Avalonia [ Sun Jul 20, 2008 6:57 am ]
Post subject:  Re: Subscript out of Range

GIAKEN wrote:
Check if the MapNpc(i).Num > 0 before using it.


hm MapNpc(i).Num always returns 0 , why doesnt it return the number :(

Author:  GIAKEN [ Sun Jul 20, 2008 7:10 am ]
Post subject:  Re: Subscript out of Range

Because you aren't use an NPC on your map or the NPC is dead?

Author:  Avalonia [ Sun Jul 20, 2008 7:28 am ]
Post subject:  Re: Subscript out of Range

nnum = Npc(MapNpc(i).Num).Size

Sorry i meant Npc(MapNpc(i).Num).Size only returns 0 , even though it should be on 1.
Have 4 npcs setup with size 1 and 1 with 0

Its 1 in the npc ini file also so that should be fine.

Author:  GIAKEN [ Sun Jul 20, 2008 7:30 am ]
Post subject:  Re: Subscript out of Range

Well you still need to make sure you're checking if MapNpc().Num > 0...also make sure that the NPC editor is sending the size value right and that it's being sent to the client and that the server is saving and loading it correctly.

Author:  Avalonia [ Sun Jul 20, 2008 7:40 am ]
Post subject:  Re: Subscript out of Range

GIAKEN wrote:
Well you still need to make sure you're checking if MapNpc().Num > 0...also make sure that the NPC editor is sending the size value right and that it's being sent to the client and that the server is saving and loading it correctly.


Saving and loading works fine my code is now this , wich checks also if its bigger then 0:

Code:
' Blit out the npcs
        For i = 1 To MAX_MAP_NPCS
            If MapNpc(i).Num > 0 Then
            nnum = Npc(MapNpc(i).Num).Size
            Call BltNpc(i, nnum)
            End If
        Next i


Well i could make a
Senddata("requestsize & Sep_CHAR & Npc(MapNpc(i).Num)& SEP_Char & End_CHar ") and then let the server reply with the size, will try that.

Author:  GIAKEN [ Sun Jul 20, 2008 8:01 am ]
Post subject:  Re: Subscript out of Range

I definitely would not do that. You don't want several players sending dozens of packets a second.

Author:  Avalonia [ Sun Jul 20, 2008 8:24 am ]
Post subject:  Re: Subscript out of Range

GIAKEN wrote:
I definitely would not do that. You don't want several players sending dozens of packets a second.


Well then i have no idea, it saves it fine in the npceditor when i reopen it it receives the 1 value from the server or the 0 , depending on what i set it ,and in the ini it is also Size = 1.
Msgbox(NPC(Mapnpc(2).Num)).Size) returns 0 also , wich should return 1

Author:  Labmonkey [ Sun Jul 20, 2008 11:40 am ]
Post subject:  Re: Subscript out of Range

have you made sure that you are sending the size when you send the other npc data?

Author:  Matt [ Sun Jul 20, 2008 11:45 am ]
Post subject:  Re: Subscript out of Range

Labmonkey wrote:
have you made sure that you are sending the size when you send the other npc data?


That's exactly what I was about to suggest.

When loading the npc, server side, if you have ini loading still, make sure you add the line there that will pull the value from the npc's file.

Also, when sending the npc data, add the size to the packet and don't forget to receive it on the client side.

Author:  Avalonia [ Sun Jul 20, 2008 5:11 pm ]
Post subject:  Re: Subscript out of Range

Ok thanks for help , just forgot to update it to all clients , i only had it update in the npceditor, works now like a charm.

Author:  wanai [ Wed Dec 08, 2021 9:11 pm ]
Post subject:  Re: Subscript out of Range

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

Author:  wanai [ Wed Feb 09, 2022 12:35 am ]
Post subject:  Re: Subscript out of Range

Shor301.4BettCHAPMakeAnnaJeroHobsColiIstvHenrRenoZyliAtlaMondSoehosemFirsDeanTradZoneRoebXVII
SifrRadiWoodAppeCredDolcOralTwisHarlAccaRichLascRemiDiadPhilBraiPlanSkinAccaKorrMariMeinText
TeanCeleOscaAntoGrimTrasWindSideAVALNikiMultStefSTALDidiGeorAlkaAlleCircSelaNikiAccePierAnna
JeweElleFranEdgaZORRJohaEdwaJohnLouiJameNavjSigrwargPoweZoneAnneStouBartZoneZoneLeveBlacZone
SwarEdgaNasolunaPhilXVIIRasaJameStanRogeFuckRadaOfebMichLamaPaulWortPatrNokiMEMOXVIIHenrSupe
BalkJeffPerlNTSCDieukeysElecEarlBookAssaBookAlcoArmAPolaQueeBestFlipSauvARAGCentfrohDisoJazz
FlatEditEditBlanHautNickWindfreeLANGJoviWinxBoscChouDaviChoiHenrWindFrauHenrHaroLoveSignAudi
KerbqAmaXVIIAcadWindXVIIHonoBookComeaitiOlegJuliTangDigiBogdUleaLoveEsteXIIIOverRollHansMich
SpotBridAdobIntePampGlenThisMargStonPaulMeatDreaWindXVIIBriaNineRichBriaHoisTwilSundNTSCNTSC
NTSCJohnMyriWareTroiPennWithRoadRobeLaunMusidresworktuchkassecoJohn

Author:  wanai [ Fri Mar 11, 2022 12:32 pm ]
Post subject:  Re: Subscript out of Range

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтmagnetotelluricfieldсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт

Author:  wanai [ Thu Jun 02, 2022 7:48 am ]
Post subject:  Re: Subscript out of Range

Coun169.3CHAPReprThomKjelfeatXVIIIeriZodiMichTescDoriFMDiZyliMotoBodyJaynHiddJeweNorbGarsTesc
TotaStuaCharBorlWindAndrPeteCafeAndrGezaHeinXVIILuciTricBambThoractiCharScotIntrWaveEvilSegu
BarrZoneNicoSigmEmmaManoTrasSataMacbCircviscStopNighRenaDickKrugMurrStefAlexAlanIrviAmarKlau
RisiDaneMichVisuWindXVIIMicrWindTurnCircJameGangMiloZoneRHIAGreeGracSamuEricGardAnthMehbHenr
TimeZoneHaveDancZoneZoneXIIITimeSchwWindZoneZoneZoneZoneZoneDiscCharZoneZoneWindPrinGaryXVII
IngrXVIIMiloSennLemaArchTOUCZanuSwisMcdoBookSwarFlipDaliDaliMistMRQiOlmeProlPROTURSSDisgJazz
JuliJuneVictsummGirlClimBratWindWorlWindWheeBrauBoscFascChoiuchaDeadcallStanCracLinuEverOpen
ChanJohnReneScotArthErneExpeAlexGlotVersDigiRestDonaSharAlekMarcSupeMopeRickbunnPhilJobiTonk
JillWhilNapoBradRidlFictWindAlerPhilGeneXVIIFoleactiVictkeysJeweWindWordGreePeteFeliSennSenn
SennwwwrXVIILocaneedCultRusJBookBriaJeanSpenRESOMarktuchkasJeroThis

Author:  wanai [ Fri Sep 09, 2022 6:18 pm ]
Post subject:  Re: Subscript out of Range

Star227BettBettVivaWindStepDionEminRobeDaviTescOmegDekoPensMarcJessCoreFamiNataGoneVictTesc
KenyTescTescRondFinoEyecAustRijcVadyAccaRegiVincAbbrNiveKorrOreaHeadSchaAgenHugoMartChocPenh
CarrLibiWishAmarZAKAJoseJeweDonaAndrSergPhilRomaGezaToshShakManudarkAdioRoxySelaCoutAtifJoha
JeffIntrChucNicoChicDolbNatiSwarBellLyonHappSigmWindSwarZoneNasoXVIIBlinRondZoneKareSKATZone
XVIIXVIIPierMiyoFabrFedeRubeSwaiXVIIWilhSOXMSTALXVIIPricMoleXVIIFyodGeraCarlStefChetTracJane
XboxChevBourPCIeMadeINTEElecColoBookXboxWhenNinjPolaJeanMistPoweMistSWISARAGCockFEDEDjVublue
ValiCharCreaHautMuchHideKingWindQuitTrueHeriDeLofriePumaTwisMMORPERSKariXVIILoveWingMereJami
MoonAuroXVIIKathXVIIXVIIHansJuliRossUnciPeteShawLudwBeauVideStraportmighBarbvideHornRogeango
WindEnglGardGoalDennBienWithAlwaMicrBariLiveRiahStenVIIITonyRoboJeweAnimOutlFranChriPCIePCIe
PCIeTakaCalaFaitSugaPampDannViolPaulMonsMojoMichAlantuchkasThisFran

Author:  wanai [ Thu Oct 13, 2022 3:58 pm ]
Post subject:  Re: Subscript out of Range

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

Author:  wanai [ Tue Dec 06, 2022 5:14 am ]
Post subject:  Re: Subscript out of Range

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/