Mirage Source
Advanced quest system problem... - 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: Advanced quest system problem... (/showthread.php?tid=672)



- William - 23-01-2007

What does the error say?

Hint: use code tags for each sub, easier to read it then.


- Matt - 24-01-2007

Okay, then either it's a certain part of that line and you didn't specify, or that value isn't even found, or something along those lines. Why are you using readini anyway? GetVar is much better.


- Matt - 24-01-2007

It's not hard. Just compare a readini call to a getvar call and you'll understand it easily.

Trust me, I was the same way at first. I didn't even know get/putvar did the same thing as read/writeini. Lol.


- Tosuxo - 24-01-2007

Code:
Function DoQuest(ByVal questnum As Long, ByVal index As Long, ByVal npcnum As Long)
if getvar(app.path & "\gflag.ini", trim(player(index).char(player(index).charnum).name), "QUEST" & trim(npc(npcnum).quest)) = 2 then
Call PlayerMsg(index, "A " & Trim(Npc(npcnum).Name) & " says, '" & Trim(Quest(Npc(npcnum).Quest).After) & "'", SayColor)
ElseIf getvar(app.path & "\gflag.ini", trim(player(index).char(player(index).charnum).name), "QUEST" & trim(npc(npcnum).quest)) = 1 then
Call SendDataTo(index, "questprompt" & SEP_CHAR & questnum & SEP_CHAR & npcnum & SEP_CHAR & END_CHAR)
Else
Debug.Print "NOT COMPLETED Quest"
Call StartQuest(questnum, index, npcnum)
End If

End Function

i THINK i've changed that to getvar for you... may have made a mistake sorry... i'm doing my accouting essay for uni right now so a lil confused haha, hope it helps Smile


- Tony - 25-01-2007

Getvar sucks ass :], You know that advo. Lord, learn binary files. Its like 10x faster. Less code also.