That FN Ninja
Member
I'm not sure I understand how wildcards are used in aliases.
Here's some code for example:
calling this function directly from within a script:
Retruns, as expected:
Pet Rock
A few aliases:
using test1 returns Pet Rock
using test2...
test2 pet rock returns Unrecognized familiar: pet rock
What is happening with the wildcard that prevents the to_familiar() function from converting the string properly?
Edit to add:
I assume it has something to do with the space between pet and rock. I don't know.
test2 rock returns Rock Lobster
test2 pet returns Pet Cheezling
test2 rock lobster returns Unrecognized familiar: rock lobster
Edit: It's not the space.
test2 bulky buddy returns Bulky Buddy Box
test2 box returns Unrecognized familiar: box
ash to_familiar("box") returns Bulky Buddy Box
Here's some code for example:
Code:
void test(string fam){
if(to_familiar(fam) == $familiar[none])
print("Unrecognized familiar: " + fam);
else print(to_familiar(fam));
}
Code:
test("pet rock");
Pet Rock
A few aliases:
Code:
alias test1 => ashq import <aaaa.ash> test("pet rock");
alias test2 => ashq import <aaaa.ash> test("%%");
using test2...
test2 pet rock returns Unrecognized familiar: pet rock
What is happening with the wildcard that prevents the to_familiar() function from converting the string properly?
Edit to add:
I assume it has something to do with the space between pet and rock. I don't know.
test2 rock returns Rock Lobster
test2 pet returns Pet Cheezling
test2 rock lobster returns Unrecognized familiar: rock lobster
Edit: It's not the space.
test2 bulky buddy returns Bulky Buddy Box
test2 box returns Unrecognized familiar: box
ash to_familiar("box") returns Bulky Buddy Box
Last edited: