diff --git a/che_close/func.php b/che_close/func.php index 985291f..62daa1c 100644 --- a/che_close/func.php +++ b/che_close/func.php @@ -6726,8 +6726,9 @@ function disaster($connect) { else { $ratio = 6 - round(1.0*$city[secu]/$city[secu2]*3); } // 3 ~ 6% if(rand()%100+1 < $ratio) { - $disastercity[count($disastercity)] = $city[city]; - $disasterratio[count($disastercity)] = 1.0 * $city[secu] / $city[secu2]; + $idx = count($disastercity); + $disastercity[$idx] = $city[city]; + $disasterratio[$idx] = 1.0 * $city[secu] / $city[secu2]; $disastername .= $city[name]." "; } }