Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MS4 Quest
#1
ok Guys, I am looking to fix my code into MS4, but I get compile error argument not optional

Code:
If Npc(npcnum).Quest > 0 Then
                       Call DoQuest(Npc(npcnum).Quest, Attacker, npcnum)
                    Else
it highlights doquest, I think it's because I don't have the charnum thing right, because it can't find the char to attach the quest to. could someone please let me know how to properly do this code

Code:
If ReadINI(Player(Index).Char(Charnum).Name, "QUEST" & Npc(npcnum).Quest, App.Path + "\qflag.ini") = 0 Then

I think this is the issue.
Reply
#2
Your calling your DoQuest sub incorrectly.

Your missing something within
Call DoQuest(Npc(npcnum).Quest, Attacker, npcnum, here)

Is what I think anyways.
Reply
#3
here's my doquest

(ByVal questnum As Long, ByVal Attacker As Long, ByVal index As Long, ByVal npcnum As Long
Reply
#4
DarkX Wrote:here's my doquest

(ByVal questnum As Long, ByVal Attacker As Long, ByVal index As Long, ByVal npcnum As Long

Call DoQuest(questnum, attacker, index, npcnum)

You gotta have all 4 of those passed to it.
Reply
#5
actually I figured that part out I had to dim Questnum as long
then add Questnum into it like attacker, questnum, npcnum) which worked now I get subscript out of range 9(i think was what it said) then it highlights this

Code:
If ReadINI(Player(index).Char(CharNum).Name, "QUEST" & Npc(npcnum).Quest, App.Path + "\qflag.ini") = 0 Then
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)