Neep help urgent !!!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 2
- Joined: Wed May 01, 2019 4:17 pm
Neep help urgent !!!
When I click on the Yellow Button I makes an error :
Can someone help me ?! It's urgent !Re: Neep help urgent !!!
Hi Mike,
1. welcome to the forum!
A little "Hello" would not have hurt for the first posting.
2. Please use a more meaningful thread title next time.
3. Not sure, but I think this is because you named your object with a NUMBER, which is a NOGO in LC! Since we have no "type definition" in LC, the engine thinks you mean graphic number 500 or graphic number 2000 and you do not have that much graphics on your card!
Use a prefix if you really need numbers in the object names -> graphic "g2000"
Then this will work as exspected.
Best
Klaus
1. welcome to the forum!

A little "Hello" would not have hurt for the first posting.
2. Please use a more meaningful thread title next time.

3. Not sure, but I think this is because you named your object with a NUMBER, which is a NOGO in LC! Since we have no "type definition" in LC, the engine thinks you mean graphic number 500 or graphic number 2000 and you do not have that much graphics on your card!
Use a prefix if you really need numbers in the object names -> graphic "g2000"
Then this will work as exspected.
Best
Klaus
Re: Neep help urgent !!!
Welcome here as well.
Your error indicates "no such object". The name of that object was "+500". Are you sure you have such an object?
You also must start using quotes around everything that is not a variable.
Example send "activateBonusObject"...
What Klaus was referring to is this. If you ask for button 3, LiveCode will try to find the third button in its layer order, NOT a button named "3". . But LiveCode "sees" "+500" as a number, resolving it to "500". See the confusion? Just don't, and be careful not to even get close, as the "+" in the name may have made you think it was OK. It isn't.
Craig
Your error indicates "no such object". The name of that object was "+500". Are you sure you have such an object?
You also must start using quotes around everything that is not a variable.
Example send "activateBonusObject"...
What Klaus was referring to is this. If you ask for button 3, LiveCode will try to find the third button in its layer order, NOT a button named "3". . But LiveCode "sees" "+500" as a number, resolving it to "500". See the confusion? Just don't, and be careful not to even get close, as the "+" in the name may have made you think it was OK. It isn't.
Craig
Last edited by dunbarx on Wed May 01, 2019 5:07 pm, edited 1 time in total.
-
- Posts: 2
- Joined: Wed May 01, 2019 4:17 pm
Re: Neep help urgent !!!
Thanks Klaus, I changed the name to bonus500, it worked !
(And i'm sorry for not saying hello...)

(And i'm sorry for not saying hello...)
Re: Neep help urgent !!!
Addition:
Although the Inspector does not provide a field or whatever to set a LABEL for a graphic, you can do this via script/message box:
1. Change the NAME of your graphics as I suggested -> g500
2. Then use the message box to set the label of the graphics:
set the LABEL of grc "g500" to "+500"
etc. for the other graphics.
This way we can have a (correct and working) name that is different from the LABEL/what we see on screen, just like buttons.
Although the Inspector does not provide a field or whatever to set a LABEL for a graphic, you can do this via script/message box:
1. Change the NAME of your graphics as I suggested -> g500
2. Then use the message box to set the label of the graphics:
set the LABEL of grc "g500" to "+500"
etc. for the other graphics.
This way we can have a (correct and working) name that is different from the LABEL/what we see on screen, just like buttons.
Re: Neep help urgent !!!
Just added an enhancement request for this:
https://quality.livecode.com/show_bug.cgi?id=22036
https://quality.livecode.com/show_bug.cgi?id=22036
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Neep help urgent !!!
What are neeps? A traditional Scottish vegetable!
https://must-see-scotland.com/what-are-neeps
-
Look no further, my friend:
https://must-see-scotland.com/what-are-neeps
-
Look no further, my friend: