Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 06:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Query UPDATE does not update the record with cash

Discussion on Query UPDATE does not update the record with cash within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2013
Posts: 6
Received Thanks: 2
Query UPDATE does not update the record with cash

Hey!



My quest does not work.

Query UPDATE does not update the record mysql with cash. Why ?

State coins shows correctly.

How fix the problem ?

Please, help me.



Code:
	
http://wklej.to/FVkvp
	
quest test begin
    state start begin
        when 9001.click begin
            say_title(" xx ")
            local cost = 100
            local id1 = query("SELECT cash FROM account.account WHERE id ='"..pc.get_account_id().."';")
            say(" Current state your coins: "..id1.." ")
            wait()
            query("UPDATE account.account SET cash=cash-"..cost.." WHERE id='"..id1.."';")
            say(" Click continue ")
            wait()
            say("Your money: "..id1)
        end
    end
end


Edit

Hay, I fix the problem, but i have new problem.

Quest not checkingmy condition ( if id1 >= 100 then ). When click "Continue" nothing happens.

Why ?
Code:
quest test begin
    state start begin
        when 9001.click begin
            say_title(" xx ")
            local cena = 100
            local id1 = query("SELECT cash FROM account.account WHERE id ='"..pc.get_account_id().."';")
            say(" State your money : "..id1.." ")
            wait()
            if id1 >= 100 then -- this if does not work
                query("UPDATE account.account SET cash=cash-"..cena.." WHERE id='"..pc.get_account_id().."';")
                local current = id1-100
                say("Current state your money:: "..current.." ")
            else
                local new = 100-id1
                say(" Your money is so small, you need: "..new.." SM! ")
            end
        end
    end
end
ModdingMT2 is offline  
Old 12/28/2014, 12:30   #2


 
Zevion's Avatar
 
elite*gold: 906
Join Date: Sep 2009
Posts: 17,295
Received Thanks: 4,399
Arrow Metin2 Main - Discussions / Questions -> Metin2 PServer - Discussions / Questions

#moved
Zevion is offline  
Reply


Similar Threads Similar Threads
VIP update in a form of item instead of making query manually
06/06/2011 - EO PServer Hosting - 4 Replies
Hi, I've been searching guides on how to update the VIP level and found out on how to update it manually. But, can the VIP level be customized into some form of item (should be in PP type) that when you were right click on to it, it will automatically updating your character's VIP level..say that the player can update it according to him at anytime. Purpose : As an event' gift or when the particular player is donating to the server.
update query
08/05/2010 - Metin2 Private Server - 5 Replies
hallo...ich hab ma in irgendeinem thread, den ich nichtmehr gefunden habe (sufu), einen query zum einstellen der gold_min und gold_max... glaub das war irgendwie so: UPDATA mob_proto.gold_min=9999 gold_max=9999 und irgendwo noch abostrophe^^ hoffentlich kann mir hier jmd weiterhelfen ;) will nich jedes mob einzeln einstellen...



All times are GMT +2. The time now is 06:10.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.