HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

ummm, why the error? (noob at jass)

07-24-2006, 11:27 PM#1
Linera
Why is this giving an error?
Collapse JASS:
local quest = a
07-24-2006, 11:32 PM#2
Rising_Dusk
You didnt specify a name for the quest.
Collapse JASS:
local quest q = a

That's all assuming 'a' is a quest.
You can create new quests using --
Collapse JASS:
native CreateQuest takes nothing returns quest

So then...
Collapse JASS:
local quest q = CreateQuest()
07-24-2006, 11:40 PM#3
Linera
now world editor crashes
current code:
Collapse JASS:
function Create_QuestREQ_DISCOVERED takes string title, string description, string iconPath returns quest
local quest q
    if (GetLocalPlayer() == Player(0)) then
        // Use only local code (no net traffic) within this block to avoid desyncs.
        q = CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, title, description, iconPath )
    endif
returns q
endfunction
07-24-2006, 11:42 PM#4
Rising_Dusk
Collapse JASS:
q = CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, title, description, iconPath )
That does nothing.

For starters...
Collapse JASS:
set q = //stuff here
Also notably, title, description, and iconpath are all undeclared and mean nothing to the WE.

Try putting in their respective data types into the function.
Collapse JASS:
set q = CreateQuestBJ(bj_QUESTTYPE_REQ_DISCOVERED, "Im a quest!", "Im a description!", "PUT AN ICONPATH HERE!")

ALSO!
At the end of your code, don't type "returns q", that's not the correct syntax.
Try this.
Collapse JASS:
return q
07-24-2006, 11:49 PM#5
Linera
thx it works now.
07-25-2006, 10:41 AM#6
iNfraNe
Only it will desync since you cannot create handles for only 1 player.
07-25-2006, 06:50 PM#7
Linera
Actually, creating a quest for one player doesn't cause a desync.
I've attached a map to prove it.
try it online.
Attached Files
File type: w3mElil's_Separate_Quest_Demo_v001.w3m (14.4 KB)