Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Don't be coy, SL

Nih Grun
Registered User
Join date: 30 Apr 2008
Posts: 58
05-27-2008 06:12
Tell me why you're really erroring.

CODE
integer quest_chain = 0;

string quest1 = "Hielmann Mavendorf";
string quest2 = "Quest Overview";

default
{
state_entry()
{
// Prep variables
}

quest(key agent_key, integer quest_progress)
{
// Stuff
}
}


"Syntax error" is being thrown on the line that reads "quest(key agent_key, integer quest_progress". I'm not sure what I'm doing wrong. I've seen other scripts call custom methods. What's up?
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
05-27-2008 06:21
CODE

integer quest_chain = 0;

string quest1 = "Hielmann Mavendorf";
string quest2 = "Quest Overview";
//declare your function before the default state
quest(key agent_key, integer quest_progress)
{
// Stuff
}

default
{
state_entry()
{
// Prep variables
quest(agent, progress);
//your function must be called from inside an event
}
}
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
05-27-2008 06:24
I never heard about any 'quest' event.
Is it supposed to be a function, you define it must come before the 'default' state
_____________________
From Studio Dora
Nih Grun
Registered User
Join date: 30 Apr 2008
Posts: 58
05-27-2008 06:28
From: Dora Gustafson
I never heard about any 'quest' event.
Is it supposed to be a function, you define it must come before the 'default' state


Aha! Thank you!
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
05-27-2008 11:41
If you want to declarate your own functions you must do it above program's main body.