Search found 73 matches
- Sun Jan 07, 2024 10:27 am
- Forum: General
- Topic: [Just for fun] Roast my code.
- Replies: 14
- Views: 297906
Re: [Just for fun] Roast my code.
Why is 'tmp' a global??? Local variables have far better performance! Also, try to structure your game to not need love.load() at all - it'll help you improve your code structure. This code was for a challenge "Create the worst text editor"(Given by a friend). Sooo the performance has to ...
- Fri Dec 29, 2023 12:00 pm
- Forum: Support and Development
- Topic: Print not printing.[Sloved]
- Replies: 4
- Views: 23478
Re: Print not printing.
Thanks for the help ! It works now
- Fri Dec 29, 2023 3:07 am
- Forum: Support and Development
- Topic: Please help [lua, love, preferences in Visual Studio Code]. I use linux ubuntu os
- Replies: 2
- Views: 11086
Re: Please help [lua, love, preferences in Visual Studio Code]. I use linux ubuntu os
Hey, I see this is your first post, Rio sooo Welcome to Love2d forms ! I cant help you with the ubuntu part but I might be able to help with the VS code part :) I use Love2d snippets and Love2d launcher and love2d support https://marketplace.visualstudio.com/items?itemName=Menerv.love2d-launcher htt...
- Fri Dec 29, 2023 2:35 am
- Forum: Support and Development
- Topic: Print not printing.[Sloved]
- Replies: 4
- Views: 23478
Re: Print not printing.
It does not work for me
Output:
It does not print aything from verify.lua.
Edit: I am using Windows 11 with WSL and my ide is VS code and Love 11.5
Output:
Code: Select all
This concludes the broadcast test. :)
Edit: I am using Windows 11 with WSL and my ide is VS code and Love 11.5
- Thu Dec 28, 2023 2:03 pm
- Forum: Support and Development
- Topic: Print not printing.[Sloved]
- Replies: 4
- Views: 23478
Print not printing.[Sloved]
Sup Im working on some dumb stuff and print wont print. This is a file verification code i wrote this is called from the conf.lua file local files = { -- name of the files "main.lua", "conf.lua" -- other files } for i = 1, #files, 1 do print("Verifing..."..files[i]) if ...
- Mon Dec 25, 2023 2:25 pm
- Forum: General
- Topic: [Just for fun] Roast my code.
- Replies: 14
- Views: 297906
Re: [Just for fun] Roast my code.
Thanks for the advise
- Sun Dec 24, 2023 8:03 am
- Forum: General
- Topic: [Just for fun] Roast my code.
- Replies: 14
- Views: 297906
Re: [Just for fun] Roast my code.
1. 'ar' is a terrible, non-descript variable name 2. 'sav' instead of 'save' for the sake of abbreviating a mere four letter word into a 3 letter filename 3. 'fnt' instead of 'font' for the sake of abbreviating a mere four letter word into a 3 letter variable name 4. 'tmp' instead of 'temp' for the...
- Sun Dec 24, 2023 6:17 am
- Forum: General
- Topic: [Just for fun] Roast my code.
- Replies: 14
- Views: 297906
[Just for fun] Roast my code.
You read the title. Roast it (if you want) --main.lua function love.load() require("libs/sav") tmp = nil ar = {} y = 0 mode = "run" fnt = love.graphics.newFont(12) love.filesystem.createDirectory("saves") function initar(file, add) tmp = load(file) for i = 1, #tmp, 1 do...
- Fri Dec 08, 2023 4:28 pm
- Forum: Support and Development
- Topic: Converting string to array [Sloved]
- Replies: 4
- Views: 19305
Re: Converting string to array
Iterate over the length string and extract substring for each position that you insert into a table. Or: str:gsub(".",function(c) table.insert(t,c) end) (https://stackoverflow.com/questions/20423406/lua-convert-string-to-table) BTW, Stackoverflow is better place to search for generic lua ...
- Fri Dec 08, 2023 3:33 pm
- Forum: Support and Development
- Topic: Converting string to array [Sloved]
- Replies: 4
- Views: 19305
Converting string to array [Sloved]
Hey ! Im making some dumb thing... again welp I ran into a problem I need to convert a string to a array a = "This is a string :)" b = {"T", "h", "i", "s"} --[[ you get the idea]]-- I need to get a single character in a single space Every help is app...