Mirage Source
MS4 Quest - 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: MS4 Quest (/showthread.php?tid=2455)



MS4 Quest - DarkX - 28-12-2008

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.


Re: MS4 Quest - Tony - 28-12-2008

Your calling your DoQuest sub incorrectly.

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

Is what I think anyways.


Re: MS4 Quest - DarkX - 28-12-2008

here's my doquest

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


Re: MS4 Quest - Matt - 28-12-2008

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.


Re: MS4 Quest - DarkX - 28-12-2008

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