Would it be possible for Wiki: getState() to return an empty string ("") if the state name passed as an argument is not defined in the campaign?
I was just trying out different coding approaches and getState() currently just spits out errors if the state is undefined, unlike getProperty(), which returns an empty string if the property is not defined on the macro (thus avoiding endless value prompts and making it easier to catch such errors).
Currently, there is no difference between getting a token's state using:
state.name
or
getState( "name" )
They both throw errors and interrupt macro execution if the state "name" is not defined in the campaign.
[1.3b56 FeatReq] getState() return empty if state undefined
Moderators: dorpond, trevor, Azhrei
Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
[1.3b56 FeatReq] getState() return empty if state undefined
"The trouble with communicating is believing you have achieved it"
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]