I know this was already answered but I didn't understand it very well.
Guys, I'm getting this really weird error and I don't know where it's coming from. I wish sol could make their error messages more understandable.
Error
[sol2] An error occurred and panic has been invoked: stack index -1, expected string, received nil
Lua Code
print("Hello, world! lua loaded!")
TITLE = "HELLO, WORLD!"
WIDTH = 1000
HEIGHT = 600
r = 0
function update()
background(BLACK)
if keydown(KEY_E) then
r = r + 0.1
end
rect(WIDTH/2, HEIGHT/2, 50, 50, 0, RED)
rotate(r)
end
DISCLAIMER
I know this was already answered but I didn't understand it very well.
Guys, I'm getting this really weird error and I don't know where it's coming from. I wish sol could make their error messages more understandable.
Error
Lua Code
More info
I'm using C++17 with Visual studio on windows 11.