Page 1 of 1

Red dot in the Script Editor [Solved]

Posted: Sun Apr 06, 2014 8:38 pm
by Baltazard
Hello,

I am new to LiveCode but i do many years of HyperCard.

For now i do my initiation making a perpetual calendar.

And i got some bug. I dont know if do something wrong or not.

I got a bug with this : add 1 to X. The script editor told with a red dot that its a mistake in this line.

add 1 to X is pretty simple line. It's not suppose to have a mistake here.

What do you think. can i do something to avoid this bad situation???

I think something is wrong with the script editor but can i do something to help myself.

I erase all the preference file in the library and i reinstall livecode like that tow times. Whit a whitout update and i also create a new stack with the same script.

I just dont know what to do now. I really really like LiveCode and i really want to do real nice thing with it.

Re: Red dot in the Script Editor [Solved]

Posted: Sun Apr 06, 2014 10:07 pm
by Baltazard
Ok Thanks God

I found the answer in the LiveCode Blog.

I just have to make a declaration of the variable like that : Local X

Thats it. But it's new for me. I was not remember this.

Re: Red dot in the Script Editor [Solved]

Posted: Sun Apr 06, 2014 10:17 pm
by Simon
Hi,
That is odd because

Code: Select all

on mouseUp
   repeat 100
      add 1 to x 
      put x
   end repeat
end mouseUp
That runs fine here, no errors.

Simon

Re: Red dot in the Script Editor [Solved]

Posted: Sun Apr 06, 2014 11:49 pm
by dave.kilroy
Hi Baltazard

I'm wondering if you have 'Strict Compilation Mode' set - this requires that all variables be declared before they can be used (amongst other things). If you open your LiveCode preferences dialog box and then navigate to the 'Script Editor' pane, do you have the 'Strict Compilation Mode' box checked or unchecked?

Dave

Re: Red dot in the Script Editor [Solved]

Posted: Mon Apr 07, 2014 12:35 am
by Baltazard
Simon wrote:Hi,
That is odd because

Code: Select all

on mouseUp
   repeat 100
      add 1 to x 
      put x
   end repeat
end mouseUp
That runs fine here, no errors.

Simon
Yes but my script is much more longer. Two tree pages.

But honestly i really like this feature.

Re: Red dot in the Script Editor [Solved]

Posted: Tue Apr 08, 2014 4:56 am
by dunbarx
But did you solve the problem by examining what Dave mentioned? He is almost certainly correct about the strict compilation mode.

Craig newman

Re: Red dot in the Script Editor [Solved]

Posted: Fri Apr 18, 2014 10:31 pm
by Baltazard
I just use the local command

local X

That's it

And i also use strict preferences. I prefer that. For me it's better when it's strict.