How i can subtract the gold

Get help using Construct 3!

Post » Wed Jul 05, 2017 10:48 pm

hi, i need some help of us, i created a family and worked good if i don't use the webstorage or local storage ( subtract correctly), but when i add the webstorage don't subtract the gold and don't dubtract and save the difference in the variable GOLD

Image

http://image.noelshack.com/fichiers/2017/27/4/1499294759-sin-titulo.jpg
B
22
S
4
G
2
Posts: 55
Reputation: 2,220

Post » Sat Jul 08, 2017 4:12 am

try to set a text to comprar.precio to ensure its reading back a correct value. also it looks that you dont have any global variables but i see you calling on them, are they perhaps on a different layout or are they just instance variables?
B
22
S
12
G
1
Posts: 108
Reputation: 2,774

Post » Sat Jul 08, 2017 4:14 am

attempt
global variable "Gold" =0
global variable "Price" = 0

on pressed, set "Price" = comprar.precio (or you can just type the number manually)
subtract "Price" from "Gold"
B
22
S
12
G
1
Posts: 108
Reputation: 2,774


Return to How do I...?

Who is online

Users browsing this forum: No registered users and 0 guests