View Single Post
  #7  
Old 03-24-2007, 04:43 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
Hmm, makevar() is quite untidy. :| Does (@ "foo") or so do anything in place of makevar()?
Still nothing :[

PHP Code:
enum test
{
  
foo "bar",
  
bar "foo"
}
function 
onCreated()
{
  
temp."foo";
  echo( 
"TEST:" SPC test.( @ temp.a));
  echo( 
"TEST:" SPC test.( @ "foo"));
  echo( 
"TEST:" SPC test.foo);

Produces
HTML Code:
TEST:
TEST:
TEST: bar
same with this..
PHP Code:
enum category
{
  
Weapons,
  
Accorories,
  
Armor,
  
Potions,
  
Quest,
  
Food,
  
Misc
}
function 
onCreated()
{
  
this.category "Food";
  
this.category_index category.(@ this.category);
  echo( 
this.category ":" SPC this.category_index);

produces
HTML Code:
Food: 0
__________________
Reply With Quote