Error: Can't create a variable with that name

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ac11ca
Posts: 41
Joined: Sun Mar 16, 2008 2:22 am

Error: Can't create a variable with that name

Post by ac11ca » Mon Jul 21, 2008 8:41 am

Hi all,

I am getting the following error, of which I cannot understand, because I just copied/pasted the coding from another (working) script. It has happened with other scripting as well, the way I have gotten rid of it is to:
- restart the program/computer (annoying!)
- making the temporary variable a global variable (so many globals now)

The coding is: "put the text of me into tText "

The error type is: "Chunk: Can't create a variable with that name (explicitVariables?)"

Any enlightenment would be really appreciated.

Cheers,
Adrian[/code]

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Mon Jul 21, 2008 9:35 am

This usually happens if you have checked to "Check Variables by default" in the script editor preferences. If that option is checked, Revolution requires you to declare your local variables (as you must do with globals). In older Rev versions (2.7 if I recall correctly) this setting was sometimes erranously checked, if the though the checkbox was marked as unchecked, so checking / unchecking this option in the Script editor prefes might helps. I tend to declare all locals now and find it extremly helpful to debug, but that is matter of taste though.

Maybe this is any help,

Malte

ac11ca
Posts: 41
Joined: Sun Mar 16, 2008 2:22 am

Post by ac11ca » Mon Jul 21, 2008 10:14 am

Thanks Malte, that seems to have been it!

Post Reply