Property: value is not a number.... WTF?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 3
- Joined: Sun Dec 01, 2019 4:36 pm
Property: value is not a number.... WTF?
I'm creating a game based on the one from game academy. I've already done this before, but I'm just gonna start from scratch because the game was so laggy on my android with an sd845. However, this shitty error is showing up now, and I don't even know why.
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Property: value is not a number.... WTF?
Well, let's think about SPACES and PARENTHESES to start with . . .
set the left of button "foreGround1" to . . . with a SPACE between the word button and its name.
to ((the left of button "foreground1") - 5)
now stop all the abusive 'WTF' because it doesn't help, makes you sound rude, and turns helpful types like me off.
set the left of button "foreGround1" to . . . with a SPACE between the word button and its name.
to ((the left of button "foreground1") - 5)
now stop all the abusive 'WTF' because it doesn't help, makes you sound rude, and turns helpful types like me off.
-
- Posts: 3
- Joined: Sun Dec 01, 2019 4:36 pm
Re: Property: value is not a number.... WTF?
Smart. I like it.richmond62 wrote: ↑Sun Dec 01, 2019 6:49 pmWell, let's think about SPACES and PARENTHESES to start with . . .
set the left of button "foreGround1" to . . . with a SPACE between the word button and its name.
to ((the left of button "foreground1") - 5)
now stop all the abusive 'WTF' because it doesn't help, makes you sound rude, and turns helpful types like me off.
Spaces doesn't even matter in this case...
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Property: value is not a number.... WTF?
I don't know why you are getting that error message:
-
Code: Select all
on mouseUp
set the left of button "foreground1" to ((the left of button "foreground1") -20)
end mouseUp
- Attachments
-
- shunter.livecode.zip
- Here's the stack
- (1.08 KiB) Downloaded 180 times
Re: Property: value is not a number.... WTF?
I'm not sure why you'd get that error either, unless it is a typing error. For instance, with one button on a stack, and in the stack script...
...moves a button back and forth with no issue.
Looking at your code that lacks any spaces, I would suggest making sure that the button names actually have no spaces.
Code: Select all
on mouseDown
set the left of button 1 to the left of button 1 -5
end mouseDown
on mouseUp
set the left of button 1 to the left of button 1 +5
end mouseUp
Looking at your code that lacks any spaces, I would suggest making sure that the button names actually have no spaces.

Re: Property: value is not a number.... WTF?
Quit and restart Livecode!
Helped here in a similar "insane" situations.
Helped here in a similar "insane" situations.

-
- Posts: 3
- Joined: Sun Dec 01, 2019 4:36 pm
Re: Property: value is not a number.... WTF?
richmond62 wrote: ↑Sun Dec 01, 2019 7:52 pmI don't know why you are getting that error message:
Code: Select all
on mouseUp set the left of button "foreground1" to ((the left of button "foreground1") -20) end mouseUp
bogs wrote: ↑Sun Dec 01, 2019 8:18 pmI'm not sure why you'd get that error either, unless it is a typing error. For instance, with one button on a stack, and in the stack script......moves a button back and forth with no issue.Code: Select all
on mouseDown set the left of button 1 to the left of button 1 -5 end mouseDown on mouseUp set the left of button 1 to the left of button 1 +5 end mouseUp
Looking at your code that lacks any spaces, I would suggest making sure that the button names actually have no spaces.
I've figured out why it's causing the error. Because of the updateScreen, the button just keeps on going left until it's out of bounce lol. So, I have to set the foreground1 to the right of foreground2(or foreground2 to foreground1) everytime the right of the button is < the left of the card, and a condition to stop the screen update.
Anyway, thanks for the help.