This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-09-12 15:52:20

benjamindragonpants
Scratcher
Registered: 2011-03-03
Posts: 78

Problem with variables!

I had a problem with variables. I wanted to subtract one variable from another, like such:
<change{ Variable1 }by( - <{ variable2 }>

Except that you can't put the minus in front of the variable.
I tried using join:

<change{ Variable1 }by( Join - <{ variable2 }>

It didn't work.
Plz help

Offline

 

#2 2011-09-12 16:14:52

laptop97
Scratcher
Registered: 2011-06-27
Posts: 1000+

Re: Problem with variables!

Make sure there's no space between - and the variable.

Last edited by laptop97 (2011-09-12 16:15:19)

Offline

 

#3 2011-09-12 17:01:04

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: Problem with variables!

Try this:

<change{ variable }by( (( -1 <*> <{ variable }> ))


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

Board footer