Ive been trying to learn to SQL manip but iv come to a dead end, can anyone tell me where iv gone wrong please.
Iv tried adding 1 field at a time and it all goes well until i get more in depth and then it jsut falls apart. this is my CD error
17:49:29:Exception) FormatStr '%s',%s,%s,%s Geo 0 0,(WizzardArts)_Merlin,TaoistTemple\WizzBook
17:49:29:Exception) TFrmSql.WriteSqlValue -> ExecSQL 2
17:49:29: :insert into Mainquest (Name,QuestLevel,Qsect,Qgold) Values(Name='Geo')
Iv tried adding 1 field at a time and it all goes well until i get more in depth and then it jsut falls apart. this is my CD error
17:49:29:Exception) FormatStr '%s',%s,%s,%s Geo 0 0,(WizzardArts)_Merlin,TaoistTemple\WizzBook
17:49:29:Exception) TFrmSql.WriteSqlValue -> ExecSQL 2
17:49:29: :insert into Mainquest (Name,QuestLevel,Qsect,Qgold) Values(Name='Geo')
Code:
[@main]
#SAY
<Quest/@qqq>\\
[@qqq]
#ACT
FormatStr "Name='%s'" %USERNAME
ReadValueSql "Mainquest" %A9 "Name,QuestLevel,Qsect,Qgold" [@precheck1]
;We use %A9 as this is a temp variable stored and created by Mir3 from the previous FormatStr, in other words, %A9 = FLD_NOTHING1='%GUILDNAME'
;Now this line will try to read your guildname in TBL_NOTHING, and look up the name, and the amount of gold your guild has.
[@precheck1()]
#ACT
Mov A3 %ARG(1) ;Retrieve Username and stores into A3
Mov D1 %ARG(2) ;Retrieves section and stores into D1 variable 1levrl
Mov D2 %ARG(3) ;qsect
Mov D3 %ARG(4) ;qgold
goto @menu2
#IF
Equal A3 "" ;If there is no guild listed under this name it makes an entry below
#ACT
FormatStr "'%s',%s,%s,%s" %USERNAME 0 0, 0 ;We format your guildname and add in 0 gold to the string
Mov A8 %A9 ;Move the temporarily generated mir3 variable into a permanent one
FormatStr "Name='%s'" %USERNAME ;Format your guildname to do a search for the guild in the field
Mov A2 %A9 ;Move the results into a permanent A2 variable
WriteValueSql "Mainquest" %A2 "Name,QuestLevel,Qsect,Qgold" %A8 ;So we add in a new entry to the table, that includes your guildname and the amount 0 gold
goto @menu2
#ELSEACT
goto @menu2