Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help again. D:
#2
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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)