Game Development Community

Wrong categoryName to get it's index!!!!!

by deepscratch · in Game Mechanics Kit · 11/09/2010 (12:24 am) · 0 replies

I keep getting this when I try to add a new Category to gameObjectCategories.cs
Ive tried every possible combination to get it to work, but no.

the server script:
function HUDData::create(%data)
{
	%obj = new StaticShape() {
		class = "HUD";
		dataBlock = %data;
	};
	return %obj;
}

function HUDData::onAdd(%this,%obj)
{
	%obj.init();
}

function HUDData::onEndSequence(%this, %obj, %slot)
{
	%obj.onAnimationEnd(%slot);
}

function HUD::init(%this)
{
	Openable::init(%this);
}


function HUD::open(%this)
{
	Openable::open(%this);
}

function HUD::close(%this)
{
	Openable::close(%this);
}

function HUD::onAnimationEnd(%this, %slot)
{
	Openable::onAnimationEnd(%this, %slot);
}

function HUD::setLockedState(%this, %flg)
{
    Openable::setLockedState(%this, %flg);            
}

function HUD::use(%this, %user)
{
    Openable::use(%this, %user);
}

ActivatePackage(TemplateFunctions);
inheritTemplate("AbstractHUD", "AbstractOpenable");
DeactivatePackage(TemplateFunctions);

my datablock script:
datablock StaticShapeData(BasicConsole)
{
    shapeFile = "art/shapes/console/console.dts";
    usable = true;

	class = "HUDData";
    
    position = "0 0 0";
	Scale="1 1 1";
	emap = true;
	receiveSunLight = "1";
	
	openAnimation = "Switch_on";
	closeAnimation = "Switch_off";
	closeAnimationReverse = false;
	
	openSnd = switcherSound;
	closeSnd = switcherSound;
};

ActivatePackage(TemplateFunctions);
inheritTemplate("BasicConsole", "AbstractHUD");
registerTemplate("BasicConsole", "GUI", "HUDData::create(BasicConsole);");
DeactivatePackage(TemplateFunctions);

can someone try these and see if you get them to work?