I am trying to make 2 commands, one which will read from a php file, and one which edits the variables being read, getting nightbot to read from the file is easy but I cant make edited variables permanent, every time it adds 1 to the var which starts at 0, and nightbot says in chat “1” but the next time I run the command I want nightbot to say “2” but it still says “1”. i cant just use the inbuilt count function because the command will read many different variables and return them all.
This is what i have currently for testing (doesnt include the 9 other variables, just the first one “bow”)
<?php
$one = 1;
$bow = 0;
if(isset($_GET[‘query’]))
{
$strQuery = strtolower(trim(urldecode($_GET[‘query’])));
switch($strQuery)
{
case ‘bow’:
$bow = $bow + $one;
echo $bow;
break;
}
}
?>