Correct syntax for equiping an item stored in prefs please?

jwylot

Member
I'm saving my current hat in prefs with
PHP:
set_property("last_hat", equipped_item($slot[hat]));
and would like to re-equip it later but can't get the syntax right. I've tried all sorts of permutations, including
PHP:
equip ($item [get_property("last_hat")]);
Thanks for your help.
 

lostcalpolydude

Developer
Staff member
I believe you want
Code:
equip( to_item( get_property( "last_hat" )0);

Also, the set_property works without turning equipped_item into a string?
 

matt.chugg

Moderator
I'm saving my current hat in prefs with
PHP:
set_property("last_hat", equipped_item($slot[hat]));
and would like to re-equip it later but can't get the syntax right. I've tried all sorts of permutations, including
PHP:
equip ($item [get_property("last_hat")]);
Thanks for your help.

Code:
set_property("last_hat", equipped_item($slot[hat]).to_string());
equip (get_property("last_hat").to_item());

edit: Ninja'd!
 
Top