From d37acbd116c55a00ac2e8710ca95f4475502340b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Thu, 15 May 2014 17:30:40 +0200 Subject: [PATCH] fixed offset error --- application/plugins/steeffeen/ObstaclePlugin.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/application/plugins/steeffeen/ObstaclePlugin.php b/application/plugins/steeffeen/ObstaclePlugin.php index 56290a9d..256152a6 100644 --- a/application/plugins/steeffeen/ObstaclePlugin.php +++ b/application/plugins/steeffeen/ObstaclePlugin.php @@ -117,7 +117,13 @@ class ObstaclePlugin implements CallbackListener, CommandListener, Plugin { } // Send jump callback $params = explode(' ', $chatCallback[1][2], 2); - $param = $player->login . ";" . $params[1] . ";"; + if (count($params) < 2) { + $message = "Usage: '//jumpto login' or '//jumpto checkpointnumber'"; + $this->maniaControl->chat->sendUsageInfo($message, $player); + return; + } + + $param = $player->login . ";" . $params[1] . ";"; try { $this->maniaControl->client->triggerModeScriptEvent(self::CB_JUMPTO, $param); } catch (GameModeException $e) {