Page 1 of 1

Lu shangs quest crash

Posted: Wed Mar 13, 2013 11:20 pm
by joshr45
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.

Re: Lu shangs quest crash

Posted: Thu Mar 14, 2013 11:56 am
by The_Kuti
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.

Re: Lu shangs quest crash

Posted: Thu Mar 14, 2013 12:18 pm
by kjLotus
iirc lua doesn't require semicolons

Re: Lu shangs quest crash

Posted: Thu Mar 14, 2013 3:43 pm
by Metalfiiish
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.

Re: Lu shangs quest crash

Posted: Thu Mar 14, 2013 3:55 pm
by PrBlahBlahtson