How to change the score through lua?
Posted: Fri May 07, 2021 12:59 pm
I recently started learning lua, and it goes pretty smoothly, but I have one problem I can't seem to solve:
How would one go about changing the score through the luna.lua file?
The PGE wiki says to use Misc.score():
It can read the score perfectly fine, but if I try to change it with something like Misc.score() = Misc.score() + 50 then it gives me an error message:

How do I use this function correctly, so that it properly changes the score value?
Thanks in advance!
How would one go about changing the score through the luna.lua file?
The PGE wiki says to use Misc.score():

It can read the score perfectly fine, but if I try to change it with something like Misc.score() = Misc.score() + 50 then it gives me an error message:

How do I use this function correctly, so that it properly changes the score value?
Thanks in advance!