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
-
chris25
- Posts: 354
- Joined: Tue Oct 08, 2013 9:32 pm
Post
by chris25 » Sat Nov 23, 2013 5:40 pm
LiveCode won't stop moaning and complaining and grumbling that it can't find the background in line 6 of this code. I have checked and re-checked each object is a group all by itself, each group is named the same as each object was originally named.What maybe are the reasons for saying that it can not find a backgound? I realise it is looking for a background because it sees a group.
Code: Select all
command initializeMines
repeat with i = 1 to 10
put "mines" & i into gMinesBegin
put 150 + (i-1)*100 into gMinesX
put 50 into gMinesY
set the loc of grp gMinesBegin to gMinesX, gMinesY
end repeat
end initializeMines
-
Klaus
- Posts: 14199
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Sat Nov 23, 2013 5:47 pm
Are you sure that all 10 groups exist on the card where you execute this command:
mines1
...
mines10
?
-
chris25
- Posts: 354
- Joined: Tue Oct 08, 2013 9:32 pm
Post
by chris25 » Sat Nov 23, 2013 6:12 pm
Yes Klaus, all 10 objects exist on the one and only card. Plus the script in this case is on that same card.
Chris
-
Klaus
- Posts: 14199
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Sat Nov 23, 2013 6:37 pm
Add an answer dialog, maybe that will give you a hint:
Code: Select all
command initializeMines
repeat with i = 1 to 10
put "mines" & i into gMinesBegin
put 150 + (i-1)*100 into gMinesX
put 50 into gMinesY
if there is NOT a grp gMinesBegin then
answer "No group:" && gMinesBegin
exit to top
end if
set the loc of grp gMinesBegin to gMinesX, gMinesY
end repeat
end initializeMines
You can also ZIP the stack and post it here!
-
chris25
- Posts: 354
- Joined: Tue Oct 08, 2013 9:32 pm
Post
by chris25 » Sat Nov 23, 2013 7:18 pm
Stepping through the breakpoints and the answer box revealed no group mines 1.. It was an 's' . I'm on the screen 6 hours a day. No excuse, no excuse.
Klaus, once again, what can I say, thanks.
-
dunbarx
- VIP Livecode Opensource Backer

- Posts: 10332
- Joined: Wed May 06, 2009 2:28 pm
Post
by dunbarx » Sat Nov 23, 2013 8:20 pm
Chris.
HAHAHAHAHA.
I knew you find a moment when you begrudgingly realized how a comma can ruin your day, but is not, particularly, the fault of LiveCode.
Welcome to our world. And no more griping, please. You are beyond that now, whether you like it or not.
Craig
-
chris25
- Posts: 354
- Joined: Tue Oct 08, 2013 9:32 pm
Post
by chris25 » Sun Nov 24, 2013 12:11 am
I know I know, griping is well and truly over now, I've grown up

But maybe I should have posted a smiley after first line as it really was not a gripe, just my long winded oddish way to say I don't know why....trying to bring smiles to my often laborious and tiresome questioning, I know you all have feelings as well...