Help with OBJ parser?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
ThatCodingGuy78
Prole
Posts: 16
Joined: Thu May 27, 2021 12:32 am

Help with OBJ parser?

Post by ThatCodingGuy78 »

I'm currently attempting to write a OBJ parser and it's not outputting anything but the 1st variables in the v and f lists.
This is a really simple parser, and I have no idea why it isn't working properly..
Here's the .love file:
Game Name.love
(9.35 KiB) Downloaded 241 times
The parser is in the objParser.lua file.
"There is no such thing as a mistake, only happy accidents"
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Help with OBJ parser?

Post by ReFreezed »

I assume this is the problem:

Code: Select all

-- This:
step2 = split(startsWithV[i], "%s")
-- should be something like this:
step2[i] = split(startsWithV[i], "%s")
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
ThatCodingGuy78
Prole
Posts: 16
Joined: Thu May 27, 2021 12:32 am

Re: Help with OBJ parser?

Post by ThatCodingGuy78 »

ReFreezed wrote: Tue Jun 29, 2021 1:27 am I assume this is the problem:

Code: Select all

-- This:
step2 = split(startsWithV[i], "%s")
-- should be something like this:
step2[i] = split(startsWithV[i], "%s")
Ah. Yeah, that was supposed to be there.. Thanks!
"There is no such thing as a mistake, only happy accidents"
Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests