From 28697e71748eced712d6950baf0b11679378116b Mon Sep 17 00:00:00 2001 From: foin137 Date: Sun, 20 Dec 2020 14:17:15 +0100 Subject: [PATCH] Constant for max player number --- Werwolf.php | 2 +- constants.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Werwolf.php b/Werwolf.php index 9bfe19e..7267efe 100644 --- a/Werwolf.php +++ b/Werwolf.php @@ -1645,7 +1645,7 @@ p#liste { { //Name gültig //Finde eine freie ID - for ($i = 1; $i <= 50; $i++) + for ($i = 1; $i <= _MAXPLAYERS; $i++) { $res = $mysqli->Query("SELECT * FROM $spielID"."_spieler WHERE id = $i"); //echo "SELECT * FROM $spielID"."_spieler WHERE id = $i"; diff --git a/constants.php b/constants.php index 44d1155..4b60dae 100644 --- a/constants.php +++ b/constants.php @@ -3,6 +3,7 @@ define("_VERSION","v1.2.4"); define("_LISTMAXRELOADTIME",3000); define("_WAITINGFOROTHERSTIME",30); //Innerhalb dieser Sekunden bleibt verborgen, auf wen noch gewartet wird. +define("_MAXPLAYERS",50); //Phasen define ("PHASESETUP",0);