Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » Money
- loizarya
- New to Scratch
1 post
Money
How do I have a store where you can buy something and if you don't have enough money, you can't buy it?
- happyland440
- Scratcher
1000+ posts
Money
You can make a variable, and when you earn you add to the variable, and if you spend you subtract to the variable like -1.
Primary PC: AMD Ryzen 7 2700, NVIDIA Geforce GTX 1070 (EVGA FTW Hybrid), 16GB Trident Z RGB DDR4, ASUS X470-I, Corsair 280X, running at 1920x1080 144hz
Laptop: Intel Core i7 4700MQ, NVIDIA Geforce GT 740M, 12GB of ram, 1600x900 resolution, running Ubuntu 16.10 in VirtualBox 4096MB RAM.
- xooxlor
- Scratcher
76 posts
Money
well like this (sorry i dont like scratchblocks in forums)
if <[money] < [purchase]> then
say [Sir, you don't have enough money!]
end
- Discussion Forums
- » Questions about Scratch
- » Money