ElectroGamesDev / BankUI

A BankUI Plugin For PocketMine
GNU General Public License v3.0
16 stars 14 forks source link

Withdraw money make me server closed #17

Closed QueenMedusa404 closed 2 years ago

QueenMedusa404 commented 2 years ago

Good plugin but your must fix this.. Problem in pm4 1.18.10

ElectroGamesDev commented 2 years ago

Send the error please.

IhsanNugroho commented 2 years ago

Bug when withdraw all money

ElectroGamesDev commented 2 years ago

Bug when withdraw all money

Send the error..

APluginCOOL commented 2 years ago

Code: [585] $playerBankMoney->save(); [586] } [587] [588] [589] } [590] [591] public function saveData(Player $player) [592] { [593] $playerBankMoney = new Config($this->getDataFolder() . "Players/" . $player->getName() . ".yml", Config::YAML); [594] $playerBankMoney->set("Money", $this->playersMoney[$player->getName()]); [595] $playerBankMoney->set("Transactions", $this->playersTransactions[$player->getName()]); [596] $playerBankMoney->save(); [597] } [598] [599] public function saveAllData() [600] { [601] foreach ($this->playersMoney as $player => $amount) { [602] $playerBankMoney = new Config($this->getDataFolder() . "Players/" . $player . ".yml", Config::YAML); [603] $playerBankMoney->set("Money", $amount); [604] $playerBankMoney->save();

Backtrace:

0 plugins/BankUI (2).phar/src/Electro/BankUI/BankUI(594): pocketmine\errorhandler\ErrorToExceptionHandler::handle(integer 2, string[31] Undefined array key "Outplay12", string[76] phar:///home/container/plugins/BankUI (2).phar/src/Electro/BankUI/BankUI.php, integer 594)

1 plugins/BankUI (2).phar/src/Electro/BankUI/BankUI(89): Electro\BankUI\BankUI->saveData(object ipad54\netherblocks\player\Player#138252)

2 pmsrc/src/event/RegisteredListener(75): Electro\BankUI\BankUI->onQuit(object pocketmine\event\player\PlayerQuitEvent#137730)

3 pmsrc/src/event/Event(62): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\player\PlayerQuitEvent#137730)

4 pmsrc/src/player/Player(2074): pocketmine\event\Event->call()

5 pmsrc/src/network/mcpe/NetworkSession(579): pocketmine\player\Player->onPostDisconnect(string[17] client disconnect, NULL )

6 pmsrc/src/network/mcpe/NetworkSession(512): pocketmine\network\mcpe\NetworkSession->pocketmine\network\mcpe{closure}()

ElectroGamesDev commented 2 years ago

Can you send the error you get in console, not crashdump please.

APluginCOOL commented 2 years ago

I can't because when the server is closed it restarts by itself

ElectroGamesDev commented 2 years ago

I can't because when the server is closed it restarts by itself

Scroll up?

APluginCOOL commented 2 years ago

what i got from console TypeError: "Unsupported operand types: int - string " (EXCEPTION) in "plugins/BankUi (2).phar/src/Electro/BankUi/BankUi" at line 526 --- Stack trace ---

0 plugins/BankUI (2).phar/src/Electro/BankUi/BankUi(248): Electro\BankUi\BankUi->takemoney(string[9] Outplay12, string[21] ...aWithdrew $21546602)

1 plugins/bankUi (2).phar/src/Electro/bankui/libs/Vecnavium/fromsUI/form(46): Electro\BankUi\BankUI->Electro\BankUi{closure}(object ipad54\netherblocks\player\Player#392331, integer 0)

2 pmsrc/src/player/Player(1985): Electro/BankUi/BankUI\libs\Vecnavium\FormsuI\Form->handleaResponse(object ipad54\netherblocks\player\player#392331, integer 0)

3 pmsrc/src/network/mcpe/handler/InGamePacketHandler(892): pocketmine\player\Player->onFormSubmit(integer 2, integer 0)

4 pmsrc/vendor/pocketmine/bedrock-protocol/src/ModalFormResponsePacket(46): pocketmine\network\mcpe\handler\InGamePacketHandler->handle ModalFormResponse(object pocketmine\network\mcpe\protocol\ModalFormResponsePacket#425371) maybe like this first because I'm tired of writing everything on the console

APluginCOOL commented 2 years ago

maybe you can fix it

ElectroGamesDev commented 2 years ago

The update is live! Until it gets approved, you can download it from here; https://poggit.pmmp.io/r/176036/BankUI_dev-66.phar