![]() |
Need help again. D: - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Need help again. D: (/showthread.php?tid=1559) |
Need help again. D: - Daemonblade777 - 12-02-2008 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: ' :::::::::::::::::::::::::: 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 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: ' ::::::::::::::::::::::: Re: Need help again. D: - Ambientiger - 12-02-2008 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) Code: Call DelChar(Index) 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. |