RPTools.net

Discussion and Support

Skip to content

It is currently Thu Jan 18, 2018 5:03 pm 




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. :)



Reply to topic  [ 1 post ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Dragon
 
Joined: Sun Jun 15, 2008 1:40 pm
Posts: 444
Location: Montréal, QC
 Post subject: [1.3b56 FeatReq] getState() return empty if state undefined
PostPosted: Mon Jul 06, 2009 9:33 am 
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. :(

_________________
"The trouble with communicating is believing you have achieved it"
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 1 post ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman