Red dot in the Script Editor [Solved]

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Baltazard
Posts: 4
Joined: Sun Apr 06, 2014 8:24 pm

Red dot in the Script Editor [Solved]

Post by Baltazard » Sun Apr 06, 2014 8:38 pm

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.

Baltazard
Posts: 4
Joined: Sun Apr 06, 2014 8:24 pm

Re: Red dot in the Script Editor [Solved]

Post by Baltazard » Sun Apr 06, 2014 10:07 pm

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.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Red dot in the Script Editor [Solved]

Post by Simon » Sun Apr 06, 2014 10:17 pm

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Red dot in the Script Editor [Solved]

Post by dave.kilroy » Sun Apr 06, 2014 11:49 pm

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
"...this is not the code you are looking for..."

Baltazard
Posts: 4
Joined: Sun Apr 06, 2014 8:24 pm

Re: Red dot in the Script Editor [Solved]

Post by Baltazard » Mon Apr 07, 2014 12:35 am

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.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: Red dot in the Script Editor [Solved]

Post by dunbarx » Tue Apr 08, 2014 4:56 am

But did you solve the problem by examining what Dave mentioned? He is almost certainly correct about the strict compilation mode.

Craig newman

Baltazard
Posts: 4
Joined: Sun Apr 06, 2014 8:24 pm

Re: Red dot in the Script Editor [Solved]

Post by Baltazard » Fri Apr 18, 2014 10:31 pm

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.

Post Reply