parse %string% as (%*classinfo%|"<.*>")
the updated parse expression should also be an effect, currently: %string% parsed as (%*classinfo%|"<.*>")
however, I think we should also be able to use parse %string% as (%*classinfo%|"<.*>") (it just makes more sense imo)
Use Example:
function hi(player: text):
parse {_player} as offline player # instead of set {_player} to {_player} parsed as offline player
send "Hi!" to {_player}
Neat little addition, but I'm currently thinking of any particular use-cases. It certainly is not hard to add though.
Neat little addition, but I'm currently thinking of any particular use-cases. It certainly is not hard to add though.
The use case that led me to make this is having a function parameter be several types, such as number, text, or a player. Obviously, I set this type to text then later parsed depending on the situation. Like in my clan system, the second arg is text. But it can also be a player for kick, invite, etc. I use default UUIDs so defining the second arg as player would cause various issues such as clan names being a player instead of a name.