RPTools.net

Discussion and Support

Skip to content

It is currently Wed May 22, 2013 8:58 am 






Reply to topic  [ 2 posts ] 

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.3b49] macro parsing changes since b47?
PostPosted: Thu Jan 01, 2009 1:36 pm 
I built up a rather large campaign file with many macros after getting all excited by the rapidly expanding possibilities. Anyway, I just loaded this campaign into b49 and the whole thing is now ridden with bugs to the point of being unuseable. All the macros work as expected in b47, but not b49 (I haven't tried b48), so I'm not sure if I have been writing macros that work under bugs that have since been fixed, or new bugs have been introduced in macro parsing.

Particular issues:
  • Macros that skip large blocks:
    One macro skips over all user input, with no error messages, then outputs normally at the end: it does not seem to be a length issue, but something peculiar with a particular section. It work normally when I remove a section that assembles a string property based on values of token properties, referenced by name as 'variables', rather than getProperty(), which used to work fine. In fact, getProperty() doesn't seem to work in my campaign file created in an older version and opened in b49, but does work in new campaigns. Given this instability, referencing them directly as 'variables' seems more universally supported.
    Another outputs the code intended to build the output message as a string literal, rather than parsing & executing the macro code. It seems like there might be something in the code that upsets the parser and then all following code gets mangled, which may explain the other issues.
  • Input fields of type "LIST" are instead being displayed as TEXT, with the variable name as the prompt, rather than the intended message. This happens when there is a carriage return in the string list being assigned to a variable within a code block (I sometimes did this for really long lists because I don't wrap lines for code in my text editor).
    This works fine:
    Code:
    [inputList = "1,2,3,4"]
    [cancel = input("input1 |"+ inputList +"| list input | LIST ")]

    This behaves oddly, as described above in 1.3b49, but used to work fine in 1.3b47:
    Code:
    [inputList = "1,2,
    3,4"]
    [cancel = input("input1 |"+ inputList +"| list input | LIST ")]
  • Errors of the type 'Could not execute the command: Unknown option name "cancel" '. 'cancel' is the variable I use to store the result of an input() function. This doesn't happen in all cases, so I'm trying to figure out what might be responsible.
    EDIT: it was a colon ':' in the comments within the input code.
    This works:
    Code:
    [cancel=input(
       "AttackName |"+ "- Generate New -"+AttackActionList +"| Load Saved (or generate new) | LIST ",   // from list of saved attack actions empty implies generic 'on the fly'
    ]

    This Does NOT work in 1.3b49, but did in 1.3b47:
    Code:
    [cancel=input(
       "AttackName |"+ AttackActionList +"| Load Saved (or generate new) | LIST ",   // from list of saved actions: empty implies generic 'on the fly'
    ]

Any idea what is responsible for these changes and how to "fix" / upgrade the macros to run in the newer versions?
If it's relevant, I have been commenting at ends of lines with "// comment" within HTML comments, which had no effect in previous builds. Even though the comment // was not working, I added them with the expectation that when this was fixed, it would not cause problems. Mind you, even removing comments does not fix the "bugs" in my macros, so I'm not sure they are responsible.
Some references on commenting macros (without breaking them) would be useful, for those interested in writing documentation ;-)

I really should just wait until macro development stabilizes before engaging on these epic macro building ventures ... good thing for backup versions :D

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


Top
 Profile  
 
User avatar  Offline
Codeum Arcanum (RPTools Founder)
 
Joined: Mon Jan 09, 2006 4:16 pm
Posts: 11386
Location: Austin, Tx
 Post subject: Re: [1.3b49] macro parsing changes since b47?
PostPosted: Thu Mar 19, 2009 10:53 pm 
This has been fixed by Craig W

_________________
Dreaming of a 1.3 release


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

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