"Fotelif"

me259259

Member
I'm sorry to ask, especially since I know I saw the answer somewhere... but how do you deal with items that have quotations in them when scripting? How do you tell the script that the quotations are part of the item, and shouldn't be treated normally?

Prime example: "filet of tangy gnat ("fotelif")"
 
Sometimes, using to_item() works. If not, you can always use the number instead. Ie
Code:
item it = $item[2528];
 
Believe in general you throw a \ before the item in question, so it would be:
filet of tangy gnat (\"fotelif\")

Edit: Yep, tested, and got the following results:
> ash to_item("filet of")

Returned: filet of tangy gnat ("fotelif")

> ash to_item("filet of tangy gnat ("fotelif")")

Expected ), found fotelif ()
Returned: void

> ash to_item("filet of tangy gnat (\"fotelif\")")

Returned: filet of tangy gnat ("fotelif")

Bonus credit: Tagging other special characters with \ for safety:
> ash to_item("filet of tangy gnat \(\"fotelif\"\)")

Returned: filet of tangy gnat ("fotelif")
 
Last edited:
Code:
> ash to_int( $item[filet of tangy gnat] )

Returned: 2528

> ash to_int( $item[filet of tangy gnat (\"fotelif\")] )

Returned: 2528
 
Back
Top