View Single Post
  #3  
Old 03-24-2007, 04:25 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Skyld View Post
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."foo";
  echo( 
"TEST:" SPC makevartemp.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
HTML Code:
Food: 0

Becuase I need the index of the current category for something I am working on..
__________________
Reply With Quote