Class modifier: Difference between revisions
Jump to navigation
Jump to search
imported>Slyz Created page with '{{ #vardefine:name|class_modifier}}{{ #vardefine:return_type|class}}{{ FunctionPage| name={{#var:name}}| function_category=Modifier Functions| function1={{Function| name={{#var…' |
imported>Heeheehee m Added some spacing for legibility purposes. |
||
Line 38: | Line 38: | ||
code= | code= | ||
<syntaxhighlight> | <syntaxhighlight> | ||
foreach it in $items[chintzy seal pendant, chintzy turtle brooch, chintzy noodle ring, chintzy saucepan earring, chintzy disco ball pendant, chintzy accordion pin] | foreach it in $items[chintzy seal pendant, chintzy turtle brooch, | ||
chintzy noodle ring, chintzy saucepan earring, | |||
chintzy disco ball pendant, chintzy accordion pin] | |||
if ( class_modifier( it, "Class" ) == my_class() ) | if ( class_modifier( it, "Class" ) == my_class() ) | ||
print("Your class chintzy item is the " + it +".") ; | print("Your class chintzy item is the " + it +".") ; |
Revision as of 23:47, 31 March 2010
Function Syntax
class class_modifier(item check_me ,string modifier_name )
class class_modifier(string check_me ,string modifier_name )
Returns a class if check_me is class specific. modifier_name should be "Class".
Code Sample
Prints the class which benefits from using a chintzy saucepan earring:
class cls = class_modifier( $item[chintzy saucepan earring] , "Class" );
print(cls);
This prints the chintzy item corresponding to your class:
foreach it in $items[chintzy seal pendant, chintzy turtle brooch,
chintzy noodle ring, chintzy saucepan earring,
chintzy disco ball pendant, chintzy accordion pin]
if ( class_modifier( it, "Class" ) == my_class() )
print("Your class chintzy item is the " + it +".") ;
More Information
See this thread for details.