BitLucid / ninjawars

The code repository where ninjas are prototyped for the ninja game @ ninjawars.net
http://ninjawars.net
13 stars 8 forks source link

Inventory: Still trying to set turns to negative. #768

Open tchalvak opened 8 years ago

tchalvak commented 8 years ago

Error where turns are still trying to be set as negative in InventoryController line 254.

Apr 24 00:48:16 megaman error.log: 2016/04/24 00:47:55 [error] 13175#0: *508933 FastCGI sent in stderr: "PHP message: exception 'InvalidArgumentException' with message 'Turns cannot be made negative.' in /srv/ninjawars/deploy/lib/data/Player.php:376 Apr 24 00:48:16 megaman error.log: Stack trace: Apr 24 00:48:16 megaman error.log: #0 /srv/ninjawars/deploy/lib/data/Player.php(388): NinjaWars\core\data\Player->set_turns(-1) Apr 24 00:48:16 megaman error.log: #1 /srv/ninjawars/deploy/lib/data/Player.php(405): NinjaWars\core\data\Player->changeTurns(-1) Apr 24 00:48:16 megaman error.log: #2 /srv/ninjawars/deploy/lib/control/InventoryController.php(254): NinjaWars\core\data\Player->subtractTurns(1) Apr 24 00:48:16 megaman error.log: #3 /srv/ninjawars/deploy/lib/Router.php(224): NinjaWars\core\control\InventoryController->useItem() Apr 24 00:48:16 megaman error.log: #4 /srv/ninjawars/deploy/lib/Router.php(67): NinjaWars\core\Router::execute('inventory', 'use') Apr 24 00:48:16 megaman error.log: #5 /srv/ninjawars/deploy/www/front-controller.php(10): NinjaWars\core\Router::route(Object(Symfony\Component\HttpFoundation\Request)) Apr 24 00:48:16 megaman error.log: #6 {main}" while reading response header from upstream, client: 10.189.245.10, server: www.ninjawars.net, request: "GET /item/use/5/103624/?link_back=player HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.ninjawars.net", referrer: "http://www.ninjawars.net/item/use/5/103624/?link_back=player"

tchalvak commented 8 years ago

AC: