guild bank does not work

smoochy boys on tour

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
Hello, I have a script Zordon release.
And there is a problem in this place:

[@main]
#IF
HasGuild
#ACT
FormatStr "FLD_GUILD='%s'" %GUILDNAME
ReadValueSql "TBL_GUILD" %A9 "FLD_GUILD,FLD_GUILDBANK" [@THegoldstuff1]
#ELSESAY
You dont have a guild.\


[@THegoldstuff1()]
#ACT
Mov D1 %ARG(2) ;Retrieves gold amount
Mov A3 %ARG(1) ;Retrieve guild name
#IF
Equal A3 "" ;If there is no guild listed under this name it makes an entry below
#ACT
FormatStr "'%s',%s" %GUILDNAME 0
Mov A8 %A9
FormatStr "FLD_GUILD='%s'" %GUILDNAME
Mov A2 %A9
WriteValueSql "TBL_GUILD" %A2 "FLD_GUILD,FLD_GUILDBANK" %A8
goto @menu
#ELSEACT
goto @menu

That's what I said in CD:

12:32:14:Exception) TFrmSql.ReadSqlValue -> Open
12:32:14: :select FLD_GUILD,FLD_GUILDBANK from TBL_GUILD where FLD_GUILD='Testeo'
12:32:14:Exception) TFrmSql.WriteSqlValue -> ExecSQL 1
12:32:14: :delete from TBL_GUILD where FLD_GUILD='Testeo



I know that the problem occurs in this part of the script, because the first time I donate gold leaves me, and when I talk to says that I have 0 Gold

I was separate the script, put it to pick up gold is another NPC, then let me pick what I donated.
But the problem is: if I talk to the NPC to donate Gold, values ​​again become 0.


Thanks
 

mapadale

Guest
I'm sorry, I still find the problem. Why the script reset fields?
If you've got the correct fields in SQL, then issue is within the full script. It would be good if you posted the full script you are using, though I know from using it myself that the script works fully.

[MENTION=15827]Josiko[/MENTION]

How are people supposed to learn, if your just going to give them the script. We might as well right a full set of 100% working files and say go ahead theirs your server, its not learning if you just give it them.
 
Upvote 0

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
Yesterday I was trying with Josiko, from remote control and more. Like I had everything, everything! But still no work.
I teach the complete script:
[@main]
#IF
HasGuild
#ACT
FormatStr "FLD_GUILD='%s'" %GUILDNAME
ReadValueSql "TBL_GUILDBANK" %A9 "FLD_GUILD,FLD_GOLD" [@THegoldstuff1]
#ELSESAY
You dont have a guild.\

[@THegoldstuff1()]
#ACT
Mov D1 %ARG(2) ;Retrieves gold amount
Mov A3 %ARG(1) ;Retrieve guild name
#IF
Equal A3 "" ;If there is no guild listed under this name it makes an entry below
#ACT
FormatStr "'%s',%s" %GUILDNAME 0
Mov A8 %A9
FormatStr "FLD_GUILD='%s'" %GUILDNAME
Mov A2 %A9
WriteValueSql "TBL_GUILDBANK" %A2 "FLD_GUILD,FLD_GOLD" %A8
goto @menu
#ELSEACT
goto @menu

[@menu]
#SAY
Bienvenido al banco del clan {FCOLOR/10}<$OUTPUT(A3)>{FCOLOR/12}\
Poseemos {FCOLOR/1}<$OUTPUT(D1)>{FCOLOR/12} Monedas de Oro.\\
<Depositar Oro/@AddGold>\
#IF
ISGUILDMASTER
#SAY
<Sacar dinero/@getstuff1>\\
#IF
#SAY
<[ Salir ]/@exit>\\\

[@ADDGOLD]
#SAY
Poseemos {FCOLOR/1}<$OUTPUT(D1)>{FCOLOR/12} Monedas de Oro.\
Cuanto dinero quieres donar?\\
<introducir cantidad/@@goldamount>

[@@goldamount]
#ACT
Mov D6 %INPUTSTR
goto @checkgold

[@checkgold]
#IF
checkgold %D6 ;Does goldcheck for amount you entered
#ACT
Inc D1 %D6 ;Adds your gold to the current gold amount in bank
FormatStr "FLD_GUILD='%s'" %GUILDNAME
Mov A8 %A9
FormatStr "FLD_GOLD='%s'" %D1
UPDATEVALUESQL "TBL_GUILDBANK" %A8 %A9
take gold %D6
#SAY
El clan {FCOLOR/10}<$OUTPUT(A3)>{FCOLOR/12} ahora posee {FCOLOR/1}<$OUTPUT(D1)>{FCOLOR/12} Monedas de oro.\\
<[ Salir ]/@exit>\


[@getstuff1]
#IF
IsGuildMaster
#SAY
Poseemos {FCOLOR/1}<$OUTPUT(D1)>{FCOLOR/12} Monedas de Oro.\
Cuanto dinero quieres donar?\\
<introducir cantidad/@@takethegold>

[@@takethegold]
#ACT
Mov D4 %INPUTSTR
goto @goldcheck

[@goldcheck]
#IF
ELARGE D1 %D4 ;If D1, which is the guildbank gold is larger than the amount you want to take out, it will allow it
#ACT
Dec D1 %D4
FormatStr "FLD_GUILD='%s'" %GUILDNAME
Mov A8 %A9
FormatStr "FLD_GOLD='%s'" %D1
UPDATEVALUESQL "TBL_GUILDBANK" %A8 %A9
give gold %D4
#SAY
El clan {FCOLOR/10}<$OUTPUT(A3)>{FCOLOR/12} ahora posee {FCOLOR/1}<$OUTPUT(D1)>{FCOLOR/12} Monedas de oro.\\
<[ Salir ]/@exit>\
#ELSESAY
No hay tanto oro en el deposito!\

Look, it is very strange that the red part not leave me in the text.
SCREEN0015.jpg



Here it is not understood or not. That's a rare mistake. If you would have to learn the script wrong and would have the same script above will not work to anyone.
 
Last edited:
Upvote 0