Lu shangs quest crash

Forum rules
NO LONGER BEING MAINTAINED!
Post Reply
joshr45
Posts: 96
Joined: Tue Mar 12, 2013 3:03 pm

Lu shangs quest crash

Post by joshr45 » Wed Mar 13, 2013 11:20 pm

Trading moat carp to Joulet crashes the server, im sure it happens with Gallijaux as well since its the same code with the quest changed.

The_Kuti
Posts: 28
Joined: Sat Oct 06, 2012 6:19 am

Re: Lu shangs quest crash

Post by The_Kuti » Thu Mar 14, 2013 11:56 am

If a missing ";" can crash the server then thats the problem.

Code: Select all

(...)
	 count = trade:getItemCount();
	 MoatCarp = trade:getItemQty(4401)
	 ForestCarp = trade:getItemQty(4289)
	 fishCountVar = player:getVar("theCompetitionFishCountVar");
	 (...)
There are two missing ";"-s.

EDIT: same applies to the other NPC.

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Lu shangs quest crash

Post by kjLotus » Thu Mar 14, 2013 12:18 pm

iirc lua doesn't require semicolons

Metalfiiish
Developer
Posts: 176
Joined: Tue Jul 31, 2012 7:21 am

Re: Lu shangs quest crash

Post by Metalfiiish » Thu Mar 14, 2013 3:43 pm

To me this seems like a possible culprit:

Code: Select all

totalFish = MoatCarp + ForestCarp + fishCountVar
player:setVar("theCompetitionFishCountVar",totalfish);
Should be:

Code: Select all

totalFish = MoatCarp + ForestCarp + fishCountVar
player:setVar("theCompetitionFishCountVar",totalFish);

totalfish is undefined, however totalFish is defined.

Second issue:

Code: Select all

function onTrigger(player,npc)
        if(player:getQuestStatus(SANDORIA,THE_COMPETITION) == QUEST_AVAILABLE
Should be the rivalry for that npc, if you look closely the onTrade is looking for the proper quest, however the quest starting CS is looking for the opposite quest.

Code: Select all

function onTrigger(player,npc)
        if(player:getQuestStatus(SANDORIA,THE_RIVALRY) == QUEST_AVAILABLE
Would test/commit fix but stuck at work.


Post Reply