Baffling can't create variable message

David V Glasgow dvglasgow at
Wed Feb 24 06:53:24 EST 2021


I have a pulldown menu button to which I want to append new searches that it does not already contain.

I have scripted this in various ways, multiple lines, single line, add parentheses, leave ‘em out, use extra variable/not,  in an attempt to isolate what I am doing wrong.  Sometimes I get a missing ‘then’ error, when it is clearly present.  However, in several constructions of the script, including the one liner below, I get

 “Can’t create a variable with that name (explicitvariables?) near text, char 113

The script is:

if the text of button "Search All" contains field "custom" = false then put return & field "custom" after the text of button "Search All"

I'm doubly confused because a) in this version of the script I am not using variables, and b) Strict compilation mode is unchecked.

I have no idea whether this is a clue, but only commands seem to be colourised in the script editor.  I also noticed that the breakpoints tab reports a breakpoint on line 54 (which doesn’t exist), and which I have never knowingly set.

LC 9.6.0 MacOS 10.13.6

At this stage I would welcome someone pointing out  a palm->face rookie error rather than anything more sinister .  

Best Wishes,

David Glasgow

More information about the use-livecode mailing list