(Plz close) Custom view counter broken!

id: 750589

category: Help with Scripts

posts: 2

I have just released a project that uses a cloud variable to count how many people ran the project (yes I know there is a normal view counter on the project page I just thought it would be cool to make a custom one). But for some reason it doesn't save the variable when a user runs the project
as you can see Here. Multiple people have viewed the project but the views stay at 1 or 3. You can view the project with This link. The only code I have with the cloud variable is just so the counter only goes up once the first time the green flag is clicked to prevent people spamming the views. I do this with a variable called “First view” which is set to 1 everytime I run the project so when I save the project the variable gets set the 1 then when anybody but me views the project the “First view” variable is set to 0 and increments the cloud variable by 1. I really don't understand if this is a problem with my code or with scratch so any help would be great!

EDIT BUT STILL NOT SOLVED: I should also note that this is really my first time doing anything with cloud variables and that I have tried fixing the issue by doing

set [☁ Views v] to ((☁ Views) + (1))

instead of

change [☁ Views v] by (1)

but this didn't make any change.

SECOND EDIT: I renamed the cloud variable and I think that fixed it! Still annoying that I had to do that but at least it works.
MineTurte MineTurte loading

-_-Onscratch wrote:

I have just released a project that uses a cloud variable to count how many people ran the project (yes I know there is a normal view counter on the project page I just thought it would be cool to make a custom one). But for some reason it doesn't save the variable when a user runs the project
as you can see Here. Multiple people have viewed the project but the views stay at 1 or 3. You can view the project with This link. The only code I have with the cloud variable is just so the counter only goes up once the first time the green flag is clicked to prevent people spamming the views. I do this with a variable called “First view” which is set to 1 everytime I run the project so when I save the project the variable gets set the 1 then when anybody but me views the project the “First view” variable is set to 0 and increments the cloud variable by 1. I really don't understand if this is a problem with my code or with scratch so any help would be great!

EDIT BUT STILL NOT SOLVED: I should also note that this is really my first time doing anything with cloud variables and that I have tried fixing the issue by doing

set [☁ Views v] to ((☁ Views) + (1))

instead of

change [☁ Views v] by (1)

but this didn't make any change.
Hmm. This should work unless it updates the cloud variable faster than it's 130 ms delay. Other than that I'm not too sure how to help.