so, i have this in client_commands, and for some reason it won't work
function eat(%i)
{
commandtoserver('consume',"purifiedwater");
commandtoserver('consume',"banana");
if(%i != "stop")
{
$eatsched=schedule(10000,0,eat);
}
else
{
cancel($eatsched);
}
}
function countdown(%a, %b)
{
if(%b >= 0)
{
commandtoserver('messagesent', %b);
%b--;
if(%a >= 1)
{
$countdownsched=schedule(5000, 0, countdown);
}
else
{
cancel($countdownsched);
}
}
}
function bottlesofspam(%a, %b)
{
if(%b >= 0)
{
if(%c >= 3)
{
%c = 1;
%b--;
}
else
{
%c++;
}
switch(%c)
{
case 1:
commandtoserver('messagesent', %b @ " bottles of spam on the wall.");
break;
case 2:
commandtoserver('messagesent', %b @ " bottles of spam!);
break;
case 3:
commandtoserver('messagesent', "Take one down, unleash the spam...");
break;
}
if(%a >= 0)
{
schedule(%a, 0, bottlesofspam);
}
}
}
the eat thing i think works fine, but the count down only displays %b, then spams commandtoserver('messagesent');, and then the bottles of spam won't work at all, and it says it has errors in the code