Tazi0 / esx_invest

ESX invest, invest into companies
GNU General Public License v3.0
14 stars 20 forks source link

Mysql Error #12

Open Blackwave78 opened 4 years ago

Blackwave78 commented 4 years ago

Hi, I have this problem, I installed everything correctly, it's a spam server and it crashes, an idea

https://i.imgur.com/yxirlqN.png

jessieBoyer commented 4 years ago

Also having a similar issue. Anyone know what's up?

Nosmakos commented 3 years ago

Go server side and replace

MySQL.Sync.execute("UPDATE `invest` SET amount=(amount/100*(100-@lost)) WHERE active=1 AND job=@label", {
                    ["@label"] = v.label,
                    ["@lost"] = Config.Stock.Lost
                })
end

To:

MySQL.Sync.execute("UPDATE `invest` SET amount =  amount / 100 * ( 100 - @lost ) WHERE active=1 AND job=@label", {
                    ["@label"] = v.label,
                    ["@lost"] = Config.Stock.Lost
                })
end