-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for some reason, this script restarts my homebrew channel: #2
Comments
I think I need more info. What does your file structure look like? |
I have my images (kris(number).png) in data folder with main.lua. That's about it. |
Looking at your code again, I think you missed a tostring() statement on line 5. It should read like this: for i = 1, 4 do
table.insert(frames, love.graphics.newTexture("kris" .. tostring(i) .. ".png"))
end The error shouldn't return to the homebrew menu though, it should just show the normal error screen. See if this helps anyway. |
kris???? |
While I really have no say in this at all, its usually a good idea to keep stuff like this serious, but again this is just my two cents. |
Concatenation should work automatically with numbers in Lua without needing a string converter, since that behaviour is defined in the Lua docs:
|
Doing the = 1
theThing = "the thing "
print(theThing + the) Gives the error |
Interesting, might have to look into this more then. |
String concatenation in Lua is more officially done with the double-dot syntax, as the issue author has done in their original code. The Lua interpreter I have installed currently outright rejects concatenation of strings with +, even when both variables are strings. |
ah ok cuz i swear the same thing happened with me with .. but ig i just got to used to writing tostring() |
Fixed in 2e7b7fe |
title says it all. btw, i think a discussions page would be really helpful so nobody has to post every single coding issue they have in the issues page.
The text was updated successfully, but these errors were encountered: