Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 08-06-2014, 10:26 PM
sklead's Avatar
sklead
Sarnak
 
Join Date: Jul 2005
Posts: 38
Default Not Understanding Error

So I've been trying to figure out this lua system for writing quests since all my perl quest files don't work. It was pretty much alright until recently. I wrote 2 different quests and modified one I had wrote before. The one I modified worked perfectly, but the 2 new ones didn't work. When I did a #questerrors on the NPCs I got the following error:
Code:
quests/eastkarana/Translocator_Nerduin.lua:6: ')' expected near ';'
I figured that meant I put an extra semi-colon in there somewhere, but I've read, re-read, and even did a ctrl+f search for ; on the quest and the only ones there are the ones that should be there. Here's one of the 2 quests I'm getting the error on:

Code:
function event_say(e)
	local level = e.other:GetLevel();
	
		if(level >= 15) then
			if(e.message:findi("hail")) then
				e.self:Say("Whenever you're [" .. eq.say_link("ready",false,"ready" .. "] just give me word and hold on!");
			elseif(e.message:findi("ready")) then
				e.other:MovePC(333, 1300.3, 190.4, -57.9, 64.0);
			end
		end
	else
		e.self:Say("I'm sorry, but Balian has instructed me to keep you here until you've become stronger. Come back when you feel better and I'll send you to the Shadowhaven.");
	end
end
So where is this extra semi-colon or what else is the problem? The quest that's working fine looks like this:

Code:
function event_say(e)
	if(e.message:findi("hail")) then
		e.self:Say("I see you're finally awake! You were almost left behind, but Balian refused to let that happen. It seems your armor was lost, though. Luckily we can [" .. eq.say_link("craft",false,"craft") .. "] some new armor for you!");
	elseif(e.message:findi("craft")) then
		e.self:Say("Crafting armor, weapons, and other items will be paramount to your success here. Almost everything will have a use in crafting! Take this kit, then go get some armor patterns from the merchant. Once you collect enough [" .. eq.say_link("materials",false,"materials") .. "] simply combine them with the pattern in the crafting kit to create your armor. It won't be much, but we can't have you fighting without protection!");
		e.other:SummonItem(8886);
	elseif(e.message:findi("materials")) then
		e.self:Say("If you wear leather you need Gnoll Hides, or plate you need Metal Bits, for chain you need Chain Links, and lastly cloth you need Silk Patches. All of these can be found from the Gnolls in the area that roam, or if you have a group you may try the Gnoll camp to the West.");
	end
end
__________________
In my defens, God me defend
Reply With Quote
  #2  
Old 08-06-2014, 11:10 PM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

Try changing
Code:
e.self:Say("Whenever you're [" .. eq.say_link("ready",false,"ready" .. "] just give me word and hold on!");
to

Code:
e.self:Say("Whenever you're [" .. eq.say_link("ready",false,"ready") .. "] just give me word and hold on!");
__________________
Maybe I should try making one of these servers...
Reply With Quote
  #3  
Old 08-06-2014, 11:26 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

Semi-colons ( ; ) are optional in lua (only required if you want to do multiple statements on a single line.)
Also these are all equivalent (as they are with Perl)

Code:
eq.say_link("materials", false, "materials")
eq.say_link("materials", false)
eq.say_link("materials")
Reply With Quote
  #4  
Old 08-07-2014, 09:17 PM
sklead's Avatar
sklead
Sarnak
 
Join Date: Jul 2005
Posts: 38
Default

Quote:
Originally Posted by Scorpious2k View Post
Try changing
Code:
e.self:Say("Whenever you're [" .. eq.say_link("ready",false,"ready" .. "] just give me word and hold on!");
to

Code:
e.self:Say("Whenever you're [" .. eq.say_link("ready",false,"ready") .. "] just give me word and hold on!");
Unfortunately that just presented me with another error. Removing the level check fixed the problem, although now anyone below level 15 can use the porter, which isn't what I intended.
__________________
In my defens, God me defend
Reply With Quote
  #5  
Old 08-07-2014, 10:14 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

You have an extra end. (Line 9 if I counted right)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:08 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3