Garry's Mod

Garry's Mod

Wiremod
Alchemist 18 Jul, 2018 @ 4:43am
Expression 2 [Counting Broken] I = I + 1, I += 1, I + 1 [BROKEN]
I've been messing around with E2 for weeks and was wandering if anyone is having these issues, my friend is also having the same problem.

Things like Value = Value + 1 or Value += 1 or Value + 1 just seems to be not working, the value freezes or resets to zero and doesn't change back.

Its happening on multiple servers including single-player, does anyone know of a patch or fix for this.

currently working on a simple gun-shop menu and the counting has been broken and i can't find a way around it.

@name Console @inputs S:wirelink [Up Down]:number @persist List = array( "Weapon 1", "weapon 2", "Weapon 3", "weapon 4" ) if(first()){ Index = 1 } function void createList(){ S:writeCell(2041,1) foreach(K, V:string = List) { if(Index == K){ Selection = 255 } else { Selection = 0 } S:writeString(V, 1, K, 255, 0, Selection) } S:writeString(Index:toString(), 1, List:count() + 1, 255,0,255) # Index Freezes at Zero } if(changed(Up) | changed(Down)){ if(Up == 1) { if(Index == 1) {} else {Index -= 1} } if(Down == 1) { if(Index == List:count() ) {} else {Index += 1} } } createList()