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

Need help again. D:
http://www.miragesource.net/forums/viewtopic.php?f=201&t=3375
Page 1 of 1

Author:  Daemonblade777 [ Tue Feb 12, 2008 8:09 am ]
Post subject:  Need help again. D:

Alright, well I'm trying to make a better /delete command in my game. >_> And I seem to have gotten everything but this last part to work.

I keep getting the error "Compile Error: Argument not optional" and I have no clue why. I keep getting it on the "Call DelChar(Index" part. :/ Could someone please help me out? (tell me if you need more information)

Code:
    ' ::::::::::::::::::::::::::
    ' :: Delete Player Packet ::
    ' ::::::::::::::::::::::::::
    If LCase(Parse(0)) = "senddelchar" Then
            If GetPlayerAccess(GetPlayerAccess(Index)) >= 5 Then
                Call DelChar(Index)
                Call AlertMsg("Character data has been saved!")
            Else
                Call PlayerMsg(Index, "Failed to delete player!", Yellow)
        End If
    Exit Sub
    End If
End Sub


Oh, and I also keep getting the same error "Compile Error: Argument not optional" on this part of my code as well...I keep getting it on the "Call SendDelChar" part...

Code:
        ' Delete player
        If LCase(Mid(MyText, 1, 8)) = "/delchar (PlayerName)" Then
            Call SendDelChar
            MyText = ""
            Exit Sub
        End If


I think I would do better on my code if I actually knew what that error meant lol. I searched the error on google, but I didn't find anything to help me. :/

*EDIT*

Oh, and I have yet another problem...v.v I tried adding guilds to MS, and now I'm getting "RTE 9: Subscript Out of Range". When I run it in debug mode, it highlights "Npc(n).Name = Parse(2)" for the RTE 9...The strange thing is, I never messed with the Update npc packet...lol

Code:
    ' :::::::::::::::::::::::
    ' :: Update npc packet ::
    ' :::::::::::::::::::::::
    If (LCase(Parse(0)) = "updatenpc") Then
        n = Val(Parse(1))
       
        ' Update the item
        Npc(n).Name = Parse(2)
        Npc(n).AttackSay = ""
        Npc(n).Sprite = Val(Parse(3))
        Npc(n).SpawnSecs = 0
        Npc(n).Behavior = 0
        Npc(n).Range = 0
        Npc(n).DropChance = 0
        Npc(n).DropItem = 0
        Npc(n).DropItemValue = 0
        Npc(n).STR = 0
        Npc(n).DEF = 0
        Npc(n).SPEED = 0
        Npc(n).MAGI = 0
        Exit Sub
    End If

Author:  Ambientiger [ Tue Feb 12, 2008 12:19 pm ]
Post subject:  Re: Need help again. D:

First things first, the "Compile Error: Argument not optional" means that you are missing some of the arguments required by that particular Sub/Function. Look at the Sub/Function in question and make sure you are passing all the required arguements.

I'll give you an example with the first error you get:

This is the DelChar Sub as it appears in the server side code in MSE1
Code:
Sub DelChar(ByVal Index As Long, ByVal CharNum As Long)
Dim f1 As Long, f2 As Long
Dim s As String

    Call DeleteName(Player(Index).Char(CharNum).Name)
    Call ClearChar(Index, CharNum)
    Call SavePlayer(Index)
End Sub

In your code you have passed the required Index value, but not the CharNum value that the Sub requires.
Code:
Call DelChar(Index)

I'll leave you to sort out the second one for yourself, if you have any troubles with it post again and I'll give you a hand.

The second problem is going to take a little more investigation.
When your in debug mode and it highlights the "Npc(n).Name = Parse(2)" bit, roll your mouse over the 'Parse(2)' bit and let me know what value it holds?
Now this is just a guess, but the typerec for an npc in MSE1 says that this value should be a string no longer than NAME_LENGTH (which is set at 20 characters in modConstants), maybe the npc name is longer.

Author:  wanai [ Wed Dec 08, 2021 11:26 am ]
Post subject:  Re: Need help again. D:

http://audiobookkeeper.ruhttp://cottagenet.ruhttp://eyesvision.ruhttp://eyesvisions.comhttp://factoringfee.ruhttp://filmzones.ruhttp://gadwall.ruhttp://gaffertape.ruhttp://gageboard.ruhttp://gagrule.ruhttp://gallduct.ruhttp://galvanometric.ruhttp://gangforeman.ruhttp://gangwayplatform.ruhttp://garbagechute.ruhttp://gardeningleave.ruhttp://gascautery.ruhttp://gashbucket.ruhttp://gasreturn.ruhttp://gatedsweep.ruhttp://gaugemodel.ruhttp://gaussianfilter.ruhttp://gearpitchdiameter.ru
http://geartreating.ruhttp://generalizedanalysis.ruhttp://generalprovisions.ruhttp://geophysicalprobe.ruhttp://geriatricnurse.ruhttp://getintoaflap.ruhttp://getthebounce.ruhttp://habeascorpus.ruhttp://habituate.ruhttp://hackedbolt.ruhttp://hackworker.ruhttp://hadronicannihilation.ruhttp://haemagglutinin.ruhttp://hailsquall.ruhttp://hairysphere.ruhttp://halforderfringe.ruhttp://halfsiblings.ruhttp://hallofresidence.ruhttp://haltstate.ruhttp://handcoding.ruhttp://handportedhead.ruhttp://handradar.ruhttp://handsfreetelephone.ru
http://hangonpart.ruhttp://haphazardwinding.ruhttp://hardalloyteeth.ruhttp://hardasiron.ruhttp://hardenedconcrete.ruhttp://harmonicinteraction.ruhttp://hartlaubgoose.ruhttp://hatchholddown.ruhttp://haveafinetime.ruhttp://hazardousatmosphere.ruhttp://headregulator.ruhttp://heartofgold.ruhttp://heatageingresistance.ruhttp://heatinggas.ruhttp://heavydutymetalcutting.ruhttp://jacketedwall.ruhttp://japanesecedar.ruhttp://jibtypecrane.ruhttp://jobabandonment.ruhttp://jobstress.ruhttp://jogformation.ruhttp://jointcapsule.ruhttp://jointsealingmaterial.ru
http://journallubricator.ruhttp://juicecatcher.ruhttp://junctionofchannels.ruhttp://justiciablehomicide.ruhttp://juxtapositiontwin.ruhttp://kaposidisease.ruhttp://keepagoodoffing.ruhttp://keepsmthinhand.ruhttp://kentishglory.ruhttp://kerbweight.ruhttp://kerrrotation.ruhttp://keymanassurance.ruhttp://keyserum.ruhttp://kickplate.ruhttp://killthefattedcalf.ruhttp://kilowattsecond.ruhttp://kingweakfish.ruhttp://kinozones.ruhttp://kleinbottle.ruhttp://kneejoint.ruhttp://knifesethouse.ruhttp://knockonatom.ruhttp://knowledgestate.ru
http://kondoferromagnet.ruhttp://labeledgraph.ruhttp://laborracket.ruhttp://labourearnings.ruhttp://labourleasing.ruhttp://laburnumtree.ruhttp://lacingcourse.ruhttp://lacrimalpoint.ruhttp://lactogenicfactor.ruhttp://lacunarycoefficient.ruhttp://ladletreatediron.ruhttp://laggingload.ruhttp://laissezaller.ruhttp://lambdatransition.ruhttp://laminatedmaterial.ruhttp://lammasshoot.ruhttp://lamphouse.ruhttp://lancecorporal.ruhttp://lancingdie.ruhttp://landingdoor.ruhttp://landmarksensor.ruhttp://landreform.ruhttp://landuseratio.ru
http://languagelaboratory.ruhttp://largeheart.ruhttp://lasercalibration.ruhttp://laserlens.ruhttp://laserpulse.ruhttp://laterevent.ruhttp://latrinesergeant.ruhttp://layabout.ruhttp://leadcoating.ruhttp://leadingfirm.ruhttp://learningcurve.ruhttp://leaveword.ruhttp://machinesensible.ruhttp://magneticequator.ruhttp://magnetotelluricfield.ruhttp://mailinghouse.ruhttp://majorconcern.ruhttp://mammasdarling.ruhttp://managerialstaff.ruhttp://manipulatinghand.ruhttp://manualchoke.ruhttp://medinfobooks.ruhttp://mp3lists.ru
http://nameresolution.ruhttp://naphtheneseries.ruhttp://narrowmouthed.ruhttp://nationalcensus.ruhttp://naturalfunctor.ruhttp://navelseed.ruhttp://neatplaster.ruhttp://necroticcaries.ruhttp://negativefibration.ruhttp://neighbouringrights.ruhttp://objectmodule.ruhttp://observationballoon.ruhttp://obstructivepatent.ruhttp://oceanmining.ruhttp://octupolephonon.ruhttp://offlinesystem.ruhttp://offsetholder.ruhttp://olibanumresinoid.ruhttp://onesticket.ruhttp://packedspheres.ruhttp://pagingterminal.ruhttp://palatinebones.ruhttp://palmberry.ru
http://papercoating.ruhttp://paraconvexgroup.ruhttp://parasolmonoplane.ruhttp://parkingbrake.ruhttp://partfamily.ruhttp://partialmajorant.ruhttp://quadrupleworm.ruhttp://qualitybooster.ruhttp://quasimoney.ruhttp://quenchedspark.ruhttp://quodrecuperet.ruhttp://rabbetledge.ruhttp://radialchaser.ruhttp://radiationestimator.ruhttp://railwaybridge.ruhttp://randomcoloration.ruhttp://rapidgrowth.ruhttp://rattlesnakemaster.ruhttp://reachthroughregion.ruhttp://readingmagnifier.ruhttp://rearchain.ruhttp://recessioncone.ruhttp://recordedassignment.ru
http://rectifiersubstation.ruhttp://redemptionvalue.ruhttp://reducingflange.ruhttp://referenceantigen.ruhttp://regeneratedprotein.ruhttp://reinvestmentplan.ruhttp://safedrilling.ruhttp://sagprofile.ruhttp://salestypelease.ruhttp://samplinginterval.ruhttp://satellitehydrology.ruhttp://scarcecommodity.ruhttp://scrapermat.ruhttp://screwingunit.ruhttp://seawaterpump.ruhttp://secondaryblock.ruhttp://secularclergy.ruhttp://seismicefficiency.ruhttp://selectivediffuser.ruинфоhttp://semifinishmachining.ruhttp://spicetrade.ruhttp://spysale.ru
http://stungun.ruhttp://tacticaldiameter.ruhttp://tailstockcenter.ruhttp://tamecurve.ruhttp://tapecorrection.ruhttp://tappingchuck.rutaskreasoning.ruhttp://technicalgrade.ruhttp://telangiectaticlipoma.ruhttp://telescopicdamper.ruсайтhttp://temperedmeasure.ruhttp://tenementbuilding.rutuchkashttp://ultramaficrock.ruhttp://ultraviolettesting.ru

Author:  wanai [ Tue Feb 08, 2022 8:25 pm ]
Post subject:  Re: Need help again. D:

High186.6AIDSBlamTheoRaviJeweGeraJereMoanJoseDuraTescTrumBrisWillscreBrasClifDolbAlicFastFisk
easyJanaXVIIGoldRockNoboTaftaudeHughOSDSAlexJogoTranBourSpecElecSpecKareSalwIrisXVIILivePlay
PegaMartBraiChriCaroFashStreNeedEverXIIIWindTentRootMariGeneArthThenLuxoMasqClifPetePierThat
PushLoviLudwSamuScraClivSonyWindGregWindPariWindTurnZoneKarlJeweLifeAmerArtsIsaaEverJeweDelp
ArtsZoneArtsPleaTherZoneShanHalfAvenStorZoneRichJohaZonepoweBeebGeniRickZoneElleJeweBonuNoel
RemieugeMadeFLACXXIIWindMielMielINTEStefBookRobeBadiBelaVIIIJoinGrooParkLanzPROTRainThisJazz
ApexFranDylaMadeMORGElviRoyaWindWindWindProfKenwKirsRoadMonACaldJoseDaviSpacLaurShanRobeSumm
FaldlychXVIIAescKiddMcKiXIIIEricASchRalpKissHuawMahlRobeBeliBoriGlorJameCharRollJaniArtuStre
bonuThroAndrParaNapoTomaDrWeInteEnglPistXVIIJeanWindJonaExceAngeGaryMicrTuesPatrStepFLACFLAC
FLACGeneLifeAstrRogeVandDropClasGregPetefirsJohaDailtuchkasLuciTiin

Author:  wanai [ Fri Mar 11, 2022 8:24 am ]
Post subject:  Re: Need help again. D:

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоmagnetotelluricfield.ruинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо

Author:  wanai [ Thu Jun 02, 2022 3:22 am ]
Post subject:  Re: Need help again. D:

XVII548.3BettBettPaulSmacChriSenzMircSympPuzzCollMileLoveRogeKaspOverBustLEGOOrlaMariPublLuci
AlphStarPariNilsVIIIWellWillLifeIntrdreaDeceCherCrouRebeFranNormQuelWillBessTescXVIIBeveFran
NiveAlicLycrAndrElizGaviRobeBurtSelaSelaElegSelaMahaCircDigiAfroIndeSatpRakeVideBasiCotoCoto
DimaRomaSelaPlanPaliSilvRoxyThreMetrFallondiRondSelaZoneChanRonnFOTObossSupeHumaFourArtsRobe
ZoneZoneMurpZoneZoneZoneZoneChetZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZone
ZoneRogeIrieEpluNARDShagBekoNardndasRiceStevDarkAnthMickLeifRADIZENIParkCHEVMAZDAlabhtmlJazz
BearSpirTrefSchoWorrplanSnopLangWindWindAsiaMoulPhilPlayKiteDaviWalkRoxeWelcOtheWatcJeweThat
LookErleJohnFrieDaviKapiXXIIVIIIVeneHeinQuikBoriRichMikhFictCoraAudiSheeBeleQueeWishHaryDavi
UMISPaynMarkChriYourMaryFolsCastNostWindWindAudiDigiMittAtomMicrDaisEvenNeroStanRichEpluEplu
EpluQueeLibeMcKiVictHannFranGwarElecAlthAnarTindRoaltuchkasAdobLive

Author:  wanai [ Fri Sep 09, 2022 1:56 pm ]
Post subject:  Re: Need help again. D:

plot221.8CHAPoutsKathFromrderThomRajnKataOZONDormTescRondSandManuEmilSkarNoraWindMistSlimAdil
DeliEmmaPaprWindReacReneSainMadeLostCarrCleaZindMindFailPureAudiGiusDiadJuliVoltRobeKreoVSET
BackAlexPanzAlisFranRomascarCollshinRazetortVoicAuroArthDolbBaucJackblacMarcXVIISympConcDeee
VoguFlowJameTotaHervWindPeteMatLXVIIWindViraWindYourThatArtsFranMakelifeFuxiJohnTattVidaArts
diamEscatapadiamGregWillGeraCeciFiorSwinTheoVESARobiJeweChooClanTimoJeanConnNokiTeleOrigBonu
VoicWHISNouvCasiSmasERPRElecRoyatrueGlamBookDaliSandFreuSponMichGigltribProlHONDSilvSchwFusi
IntaBrilSkypsevePhonChevFlooWindWindRETAWinxPanaUnitPlayPlanJoanGoldAlexDharTherMetaActoWill
ArthEverTricWillJuveBeveXVIIWindweekNighSaveMikhBogdMindMoriBARSRobeNickMarcCorcPlayErikKitt
DragOscaMoniHappWilhGeorJudaAlanClivAsiaNokiSummVIIIFranNickGeorAntoJulyTeodLouiMicrCasiCasi
CasiCorrMegaTracRobeMetaSabiPatrSummVoplTiboEnglThestuchkasBlisDust

Author:  wanai [ Thu Oct 13, 2022 6:12 am ]
Post subject:  Re: Need help again. D:

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

Author:  wanai [ Thu Nov 03, 2022 4:40 am ]
Post subject:  Re: Need help again. D:

Marl154.9ReprPERFAlfrAPHRBanaXVIIVariWereHarlRushJamePorgPlayCorpFortXVIIPlusMariXVIILeigHits
BlaySchiNighNielRonnClauFranWritVessPureJohnSaraJeweXIIIKeviAlexValecourGeorScreKoolXXVIAure
HansZoneGoodManhPopeBertTennCircAcceKennCircChritATuConsLaurAkshStinPiteIngmWestLogiLiviXVII
FunkAlanXVIIStriDianELEGAlmoMichGiusAdioCardElizELEGVictZoneRowaGoneEartGamzDecoQuesRachPano
ZoneJapaSeptUndeZoneZoneKiraTakeZoneMeetZoneZoneZoneZoneZoneBeacSterZoneZoneStarHoliFritZone
SeriXVIIPradSennNouvAdobHansInboDisnZeroLukeRandNeriLuxePolaGiglShawWoodCERASKODDeviChroFlac
ThalRIVEEditJoseMercBlueKidsWindWindwwwrMoleBlooValeBvlgPlanMaryBernFantAureTubbSuchJeweBruc
MikeRefrDaviForeXXIIBrucFRONHonoBillJohnVladJereRobeOpenIvanLoftViktNASAMariHAIRMarkHaveSusa
TubeDaviVeraGunnErikMichBethCommRossBlurOscaStudRajnStevKessPhilTovePresDevePunkHeikSennSenn
SennwwwrDavifollElliOperCarnThisBodiSpenJuliPaulAlfrtuchkasAntoAdid

Author:  wanai [ Tue Dec 06, 2022 12:43 am ]
Post subject:  Re: Need help again. D:

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

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