SQL scripting

hallmat

LOMCN Veteran
Veteran
Feb 19, 2007
555
1
125
hey im getting this error
Code:
9:31:12:Exception) TFrmSql.WriteSqlValue -> ExecSQL 2
9:31:12: :insert into TBL_GUILDPOINTS (FLD_GUILD,FLD_GUILDLEVEL) Values('mehn')
Code:
#ACT
FormatStr "FLD_GUILD='%s'" %GUILDNAME
mov a2 %a9                 
ReadValueSql  "TBL_GUILDPOINTS"  %A9  "FLD_GUILD,FLD_GUILDLEVEL" [@Forward]

[@Forward()]
#ACT
Mov A3 %ARG(1)      ;Store GUILD in A3
Mov D1 %ARG(2)      ;Store GUILDLEVEL in D1
GOTO @Continue


[@Continue]
#IF
Equal A3 ""
#ACT
FormatStr "'%s'" %GUILDNAME
Mov A6 %A9
FormatStr "FLD_GUILD='%s'" %GUILDNAME
Mov A5 %A9
FormatStr "FLD_GUILDLEVEL='%s'" 1
Mov A4 %A9
WriteValueSql "TBL_GUILDPOINTS" %A4 "FLD_GUILD,FLD_GUILDLEVEL" %A6
GOTO [@FinishMakingGuild]

i think its trying to write mehn to the GUILDLEVEL part that should be a number not mehn

Mehn is the test guild i made

Tables are made and so are the FLDs

any help would be great
 

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
Yeah this script has been a bugger for me to get right. Had it working fine at one point then it just stopped working. No idea why it stopped working but it did lol
 
Upvote 0

hallmat

LOMCN Veteran
Veteran
Feb 19, 2007
555
1
125
any of the script kings out there IDabiga, Chimera?

lol i cant get it working i broke it down and still nothing im sure its just a %A wrong someewhere but cant figure it out
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
Hmm looks bad for me, you write 2 and give one Info, and A5 not used o.O
A4 need at end and A6 at Front...


If long time ago :
mean so it is correct
WriteValueSql "TBL_GUILDPOINTS" %A6 "FLD_GUILD,FLD_GUILDLEVEL" %A5 , %A4
 
Last edited:
Upvote 0