Jump to content
×
×
  • Create New...
  • 0

Guild account problem


Namikaze

Question

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

6PRTP.jpg

 

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 by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Answers 6
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

6 answers to this question

Recommended Posts

  • 0

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

  • 0
  • Premium

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.

Currently working on my FreeBSD blog:

FreeBSD is Fun, practical tutorials and articles

⚠️                Are you under attack?               ⚠️

Link to comment
Share on other sites

  • 0

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Metin2 Dev Github
  • Activity

    1. 0

      max level exp

    2. 8

      Quest States Core Crash Item Dupe Bug Fix

    3. 23

      Umbra / Soft4Win / SNap! scammer exposed!

    4. 46

      Ship Defense (Hydra Dungeon)

    5. 10

      Rodnia Glory | A REAL SPEED SERVER | Start 02.09.2022

    6. 0

      Avery seeks an experienced team manager

    7. 0

      Wear (use) item only on specific map

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.