A bug idk how go get round it


basically im tryna do when the fill all button is click it fills the required amount. However the issue is im adding 1 variable and the other is minusing it out which makes it bug out the engine idk how to explain.

All i want to do is check if the player has above 5 cargo and if so they the sentcargo only adds 5 rather than what i did in the code. For if i did the way right im saying it will either do o
one the action and the other the opposite in what i intended to do. Note the sec pic is currently what im using but looking for a way to swap it out with the one i originally intended to.

Why don’t you try that with the events? If you get stuck then follow up with another post and someone will help out.