heres the code
repeat game.Lighting.FogEnd = game.Lighting.FogEnd.Value +10 until game.Lighting.FogEnd = 100
but it has a error on line 4/3 i'm not sure what i did wrong can anyone help me?
=
is assignment. You cannot use it to compare two values. You need to use ==
to compare two values.
While it will probably work in this case, you should probably make the condition >=
anyway, so that if the start length was not a multiple of ten less than one hundred, it will still stop it.
Finally, you don't have any pauses between iterations of the loop, so this would be indistinguishable from just setting the FogEnd
to 100. You will probably want to add a wait
of some amount to the loop.
Also, this might not be the best place for a repeat
loop, but it's more than sufficient.
repeat game.Lighting.FogEnd = game.Lighting.FogEnd.Value + 10 until game.Lighting.FogEnd == 100