Quote:
Originally Posted by Skyld
enums are for integers, not strings. I think you want to use consts for strings, i.e.
PHP Code:
const foo = "bar";
|
PHP Code:
const foo = "bar";
function onCreated()
{
temp.a = "foo";
echo( "TEST:" SPC makevar( temp.a));
echo( "TEST:" SPC foo);
}
Produces
HTML Code:
TEST:
TEST: bar
Still not working :[
Edit:
this is what I originally tested/needed it for:
PHP Code:
//#CLIENTSIDE
enum category
{
Weapons,
Accorories,
Armor,
Potions,
Quest,
Food,
Misc
}
function onCreated()
{
this.category = "Food";
this.category_index = makevar( "category." @ this.category);
echo( this.category @ ":" SPC this.category_index);
}
Produces
Becuase I need the index of the current category for something I am working on..