Well that was just something small, this is the actual thing:
package chatbotActive
{
$Active = 1;
function clientCmdChatMesage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
{
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
%self = (%name $= $Pref::Player::NetName);
switch$ (%msg)
{
case "CB, Turn Off":
if(%self)
if($Active = 1)
comamandToServer('messageSent',"ChatBot: Shutting Down…");
deactivatePackage("chatbot");
$Active = "0";
case "CB, Turn On":
if(%self)
if($Active = 0)
commandToServer('messageSent',"ChatBot: Powering Up…");
activatePackage("chatbot");
$Active = "1";
}
}
};
activatePackage( "chatbotActive" );
I get the error at $Active = 1;