Kyouko 0 Posted February 9, 2014 Share Posted February 9, 2014 (edited) Hey guys i have a problem with this quest quest gildenkonto begin state start begin function get_money() return tonumber(mysql_query("select gold from player.guild where name = '".. guild.get_name() .."';")[1][1]) or 0 end when 11000.chat."Gildenkonto" or 11002.chat."Gildenkonto" or 11004.chat."Gildenkonto" with pc.has_guild() begin say_title("Gildenkonto") if not pc.is_guild_master() then say_reward("Nur der Gildenleader kann auf das[ENTER]Konto zugreifen") say() return else say_reward("Guthaben: ".. gildenkonto.get_money()) say() local s = select("Geld abheben","Geld einzahlen","Abbrechen") if s == 3 then return elseif s == 1 then say_title("Gildenkonto") say("Wieviel Geld möchtest du abheben?") say() local m = tonumber(input()) if m < 1 or m == nil then return end if m > gildenkonto.get_money() then return syschat("Es ist nicht genügend Yang vorhanden") end if pc.get_money()+m > 1999999999 then return syschat("Du hast zu viel Yang bei dir") end pc.change_money(m) mysql_query("update player.guild set gold = gold - ".. m .." where name = '".. guild.get_name() .."';") else say_title("Gildenkonto") say("Wieviel Geld möchtest du einzahlen?") say() local m = tonumber(input()) if m < 1 or m == nil then return end if m > pc.get_money() then return syschat("Du hast nicht genügend Yang") end pc.change_money(-m) mysql_query("update player.guild set gold = gold - ".. m .. " where name = '".. guild.get_name() .."';") end end end end end if i click on Gildenkonto nothing happens and it just say Gildenkonto and Ok my syserr says only this SYSERR: Feb 9 17:40:37 :: RunState: LUA_ERROR: locale/germany/quest/object/state/gildenkonto:1: attempt to index field `?' (a nil value) SYSERR: Feb 9 17:40:37 :: WriteRunningStateToSyserr: LUA_ERROR: quest gildenkonto.start enter Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Denis 1474 Posted February 9, 2014 Share Posted February 9, 2014 try to replace your quest function get_money() with this function get_money() local a = mysql_query("select * from player.guild where name = '".. guild.get_name() .."';") return a.gold[1] end Link to comment Share on other sites More sharing options...
Rumor 2605 Posted February 9, 2014 Share Posted February 9, 2014 Please use the code BBCODE and select "Quest" when you post quests, it looks much neater. Moved to Programming. Link to comment Share on other sites More sharing options...
Premium Shogun 4587 Posted February 9, 2014 Premium Share Posted February 9, 2014 That's not going to work. Guild table cannot be updated while game is running. Link to comment Share on other sites More sharing options...
Kyouko 0 Posted February 9, 2014 Author Share Posted February 9, 2014 That's not going to work. Guild table cannot be updated while game is running. hm okay... Please use the code BBCODE and select "Quest" when you post quests, it looks much neater. Moved to Programming. sry now i know it for the next time Link to comment Share on other sites More sharing options...
Premium Shogun 4587 Posted February 9, 2014 Premium Share Posted February 9, 2014 You would need to change the game or db source for that to work. Actually, in 2007 or so, Ymir had this system working, they removed it for some reason. Link to comment Share on other sites More sharing options...
Kyouko 0 Posted February 10, 2014 Author Share Posted February 10, 2014 You would need to change the game or db source for that to work. Actually, in 2007 or so, Ymir had this system working, they removed it for some reason. hm okay but atm i use the 34083 game because the new game has a callback function as i know ^^ Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now