Very confused on a voting system. May be a bug?

So i need help with a map voting system. I used the same version that I made a guide on. Except it doesn’t work. The thing is, the whole voting system is not broken. My counter counts and updates the property and everything. However, it doesn’t relay it to a channel like the other parts of my code.
this is my code



image
For some reason, the first part of this if statement where it is checking if 5 is greater isn’t working. It wont broadcast the message to the channel. Any ideas?
It is supposed to deactivate a barrier
image

I don’t see any obvious mistakes. The only thing that might be a possibility is the value of the property is changing while the code block is running. (You call get property several times)

to fix this i would store each property as a variable so that way if it changes it changes all the declarations of property A

i only use that property once



IMG_3051

See how you use each property multiple times.
If your computer is running really slow and you have the property changing while this is running it could switch values. Instead declare all of these as separate variables

1 Like

e. I have 4 of those in my game. It should work fine. Anyways, how do I declare them variables?

Create a new variable in the variables tab. Drag a set variable to block out and set the variable to the property at the top of your code. Now grab the other variable block out of the variables tab and put it where the get properties blocks were

can you please show me?

Im on mobile so it might be distorted but ill try my best

also the issue is not with the whole code. THe two elif statements and the else statements work fine. It is just the if part.

Yeah. Im just trying this because it makes this easier to read and also could be the problem.

It would look something like this

sorry i was afk. I undestand though. GIve me a moment to check if it works.

it still doesn’t work. The one part of the if statement isn’t working

Ok. I will try some things

What are you’re properties settings?

let me check one moment.

so my network is not working but they are set to number

Once it loads double check them. Also do you want < or <= cause that could be affecting it.

This might not seem like much the code is solid so i’m trying to think of small possible bugs

I want < because if they are equal I want it to go to a specific channel.

and yes I checked. They are numbers.

Psh. I have zero idea. Is the channel being used for something else? That can impact outcomes.