Closed BombasticTom closed 2 years ago
the code looks right; either the game is crashing from the table or from getTextFromFile
it's the table then i'll try and fix it then
idk i think I'm doing something wrong (placeholder is just a normal nave I gave) the upper text is the splitted txt file It just doesn't work with the noteskins table for some reason
i know how to fix it
fixed :D
function mysplit(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={}
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
table.insert(t, str)
end
return t
end
function onCreate()
--noteskins = {
--'Vanilla', 'DDR', 'Doki Doki Plus', 'Circles'
--}
noteskins = mysplit(getTextFromFile('./data/Saves/skins.txt'), '\n')
options = {
{'Player Noteskin', 'pnoteskin', 'string', noteskins[1], noteskins},
{'Opponent Noteskin', 'onoteskin', 'string', noteskins[1], noteskins},
{'Choose your Character', 'bfchar', 'string', 'BF', {'BF', 'Pico-Player', 'Eduardo'}},
{'well well well', 'eduardo', 'bool'}
--{'hitsound', 'bool', {'true', 'false'}, 'false'}, Do we need this anymore lmao?
}
fixed code
@BombasticTom can you share the code (full code) cuz i wanna use these types of options
What feature do you want to get added on the base engine?
READ BEFORE YOU SAY DO IT WITH LUA, I TRIED. IF I DIDN'T TRY I WOULDN'T HAVE OPENED THIS ISSUE!
so I tried combining the new getTextFromFile callback with a custom function to split the text lines into multiple list items it did work, but for some reason, the game would just crash.
Necessary code I wrote you'll need to know:
Since this plan didn't work, I would suggest to you to either fix the bug (or help me if it's not working because of me since I'm an idiot), or to make a new callback that separates list rows
(btw I know this code doesn't have end, that's because it's not the full code)
To test your sight, and reliability, please select the option of what should NOT be requested.
Stage Editor, 6K+ support, and winning icons.