LUA script: possible bug

Case number:699969-2005023
Topic:General
Opened by:bertro
Status:Closed
Type:Bug
Opened on:Tuesday, April 10, 2018 - 21:37
Last modified:Wednesday, April 11, 2018 - 14:42

The attached script, when run, works ok.

But if any of the commented lines are un-commented then it return an ERROR during compilation.

Anyone can explain what is happening?

Thanks

(Tue, 04/10/2018 - 21:37  |  6 comments)


bertro's picture
User offline. Last seen 4 hours 38 min ago. Offline
Joined: 05/02/2011
Groups: Beta Folders

Attachment:

rmoretti's picture
User offline. Last seen 6 hours 19 min ago. Offline
Joined: 01/15/2010
Groups: None

Not 100% up to speed on Lua, so I might be missing some advanced detail, but from what I understand, Lua identifiers can be any string of letters, digits, and underscores -- so long as they don't start with a digit.

In the commented out lines you're starting the instance variable with the digit '1' (one), versus the other lines, where you're using the letter "l" (lower-case L).

bertro's picture
User offline. Last seen 4 hours 38 min ago. Offline
Joined: 05/02/2011
Groups: Beta Folders

if you have a 2nd look, lines 20 to 23 and 44 to 47 are in the same situation but do not trigger the problem. Why?

robgee's picture
User offline. Last seen 13 hours 35 min ago. Offline
Joined: 07/26/2013

Its the font.
lines 20 to 23 and 44 to 47 actually do start with an 'l', ie lowercase 'L'.

ask.ll3a = dialog.AddLabel("myString") --no error {lowercase L}
ask.113a = dialog.AddLabel("myString") -- error {digit}

bertro's picture
User offline. Last seen 4 hours 38 min ago. Offline
Joined: 05/02/2011
Groups: Beta Folders

Thanks for catching that. I was getting nuts :)

bertro's picture
User offline. Last seen 4 hours 38 min ago. Offline
Joined: 05/02/2011
Groups: Beta Folders
Status: Open » Closed

Open => Closed

Sitemap

Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, RosettaCommons