EOSERV Forum > EO Server Building > Impossible Quest Error. Help Quest Wiz's Plz
Page: << 1 >>
Impossible Quest Error. Help Quest Wiz's Plz
Author Message
Post #197280 Impossible Quest Error. Help Quest Wiz's Plz

state Sheep
{
desc "Butchering Sheep"
if GotItems(502, 1) goto Sheep1
else if GotItems(502,10) goto Sheep2
else if GotItems(502,20) goto Sheep3
else if GotItems(502,30) goto Sheep4
else if GotItems(502,40) goto Sheep5
else if GotItems(502,50) goto Sheep6

else goto MainMenu
}

and the error is:
> Syntax Error: Expected '(' after function-name. Got: identifier 'gotitems' (Line 72)

Line 72 starts at else if GotItems(502,10) goto Sheep2

What's wrong?

Here's the full quest:

http://pastebin.com/Muy2W1hp

The quest works if I use IF instead of else if, but then the quest doesnt continue and it stays on the same state.


I am using EOSOURCE revision.

8 years, 34 weeks ago
Post #197281 Re: Impossible Quest Error. Help Quest Wiz's Plz

Your logic is spot on, but unfortunately "else if" is something the quest engine doesn't support. Also, you probably want to list the desired GotItems rule for the quest progress display first so players can see if a completion is met.  

You can use it like this:

  1.         rule      GotItems(502, 50) goto Sheep1
  2.         rule      GotItems(502, 40) goto Sheep2
  3.         rule      GotItems(502, 30) goto Sheep3
  4.         rule      GotItems(502, 20) goto Sheep4
  5.         rule      GotItems(502, 10) goto Sheep5
  6.         rule      GotItems(502, 1) goto Sheep6   
8 years, 34 weeks ago
Post #197285 Re: Impossible Quest Error. Help Quest Wiz's Plz
Apollo posted: (9th Aug 2015, 12:33 am)

Your logic is spot on, but unfortunately "else if" is something the quest engine doesn't support. Also, you probably want to list the desired GotItems rule for the quest progress display first so players can see if a completion is met.  

You can use it like this:

  1.         rule      GotItems(502, 50) goto Sheep1
  2.         rule      GotItems(502, 40) goto Sheep2
  3.         rule      GotItems(502, 30) goto Sheep3
  4.         rule      GotItems(502, 20) goto Sheep4
  5.         rule      GotItems(502, 10) goto Sheep5
  6.         rule      GotItems(502, 1) goto Sheep6   

Dude. I was hoping you'd reply. Thanks, it worked! I wasn't sure if the rules would work because last time I tried using multiple rule GotItems in a quest, it ended up reading them wrong, but that's maybe because I put them in the wrong order. Anyways, thanks a lot!
8 years, 34 weeks ago
Page: << 1 >>

EOSERV Forum > EO Server Building > Impossible Quest Error. Help Quest Wiz's Plz