[CD3.55] SQL Errors From Quests

smoochy boys on tour

BreakingPoint

LOMCN n00bie
Nov 8, 2014
7
0
12
Hello guys, I'm wondering if anyone has come across this error on CD before as I'm struggling to understand it. I have check the DB tables exist and have data in them but im not sure why it gives me the Exception
if anyone could point me in the right direction it would be much appreciated

this error appears when you complete the quest and your supposed to get a reward (the system gives nothing)

ps. my main aim is to get all the original mir3 quests working and in using 3.55 files


Exception) TFrmSql.ReadSqlValue -> Open
11:02:53: :select FLD_REWORD1NAME,FLD_REWORD1AMOUNT,FLD_REWORD2NAME,FLD_REWORD2AMOUNT from TBL_MainQuestReward where FLD_NAME='AreaQuest1' FLD_COND1=3FLD_COND2='0' FLD_COND3=0
11:02:53:Exception) TFrmSql.ReadSqlValue -> Open
11:02:53: :select FLD_REWORD3NAME,FLD_REWORD3AMOUNT,FLD_REWORDFAME from TBL_MainQuestReward where FLD_NAME='AreaQuest1' and FLD_COND1=3FLD_COND2=0 and FLD_COND3=0
 

BreakingPoint

LOMCN n00bie
Nov 8, 2014
7
0
12
#IF
checkitem Book 1
#ACT
SET [301] 1
take Book 1
Mov A0 "AreaQuest1"
Mov D0 2
Mov D1 0
Mov D2 0
Mov D3 0
Goto @EverythingReward
FormatStr "FLD_CHAR='%s'" %USERNAME
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1_RDY=0"
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1=3"





#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide1\ChoBoGuide1_Warrior.txt] @Convert_ChoBoGuide1_Warrior_6


cant seem to locate the "@everythingreward" part of the script in any of the associated files

this part of the script is when the SQL error appears in CD after the book is taken and you are supposed to get a reward, would i be right in saying that i may need something like:

[@everythingreward]
#CALL [System\TotalRewardSystem.txt] @TotalRewardSystem <-------- in the mir3guidebook.txt aka D menu?

this currently doesnt exist in the mirguidebook but is this what is causing the error?


part of the totalreward script ... has the above sql error commands in

#ACT
Mov A8 ""
FormatStr "FLD_NAME='%s' FLD_COND1=%s" %A0 %D0
Mov A8 %A9
FormatStr "FLD_COND2='%s' FLD_COND3=%s" %D1 %D2
AddStr A8 %A9
ReadValueSql "TBL_MainQuestReward" %A8 "FLD_REWORD1NAME,FLD_REWORD1AMOUNT,FLD_REWORD2NAME,FLD_REWORD2AMOUNT" [@TotalRewardSystem_Setting_Pre]


[@TotalRewardSystem_Setting_Pre()]
#ACT
Mov A3 %ARG(1)
Mov D3 %ARG(2)
Mov A4 %ARG(3)
Mov D4 %ARG(4)
Mov A8 ""
FormatStr "FLD_NAME='%s' and FLD_COND1=%s" %A0 %D0bb
Mov A8 %A9
FormatStr "FLD_COND2=%s and FLD_COND3=%s" %D1 %D2
AddStr A8 %A9
ReadValueSql "TBL_MainQuestReward" %A8 "FLD_REWORD3NAME,FLD_REWORD3AMOUNT,FLD_REWORDFAME" [@TotalRewardSystem_Setting]




[@TotalRewardSystem_Setting()]
#ACT
Mov A5 %ARG(1)
Mov D5 %ARG(2)
Mov D6 %ARG(3)
#IF
!Equal D6 0
Checkfame
#ACT
inc P9 %D6
SetFame %P9
LoadValue A7 [Convert_Def\QuestDiary\System\TotalRewardSystem.txt] [Convert] [Msg0]
SysMsg %A7
LoadValue A7 [Convert_Def\QuestDiary\System\TotalRewardSystem.txt] [Convert] [Msg1]
SysMsg %A7


#IF
ISADMIN
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\TotalRewardSystem.txt] [Convert] [Msg2]
sysmsg %A7


#IF
#ACT
goto @TotalRewardSystem_Setting_1Step

thanks in advance
 
Last edited:
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
There are couple of errors in that SQL portion related to the error point here >>

FLD_COND1=3FLD_COND2='0'

Firstly, there is no space between the '3' and the 'F'
Secondly, you are trying to search a number field with a string, you should be searching for 0, but are actually searching for '0'.

To fix, change... this..

Code:
FormatStr "FLD_COND2='%s' FLD_COND3=%s" %D1 %D2

to this..

Code:
FormatStr " FLD_COND2=%s FLD_COND3=%s" %D1 %D2
Notice, removed the ' from around the COND2 argument, and also added a space before FLD_COND2. The missing space is in both sections shown above that reference COND2.

Hope that helps with the error.
 
Last edited:
Upvote 0