View topic - Fbi2Lua is broken.



All times are UTC + 1 hour


Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Fbi2Lua is broken.
PostPosted: 15 Apr 2012, 05:03 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
local success, defs = pcall(VFS.Include, 'gamedata/defs.lua', defsEnv)

defs.unitdefs and defs.featuredefs show up as empty tables.

Any ideas?


Top
 Offline Profile  
 
 Post subject: Re: Fbi2Lua is broken.
PostPosted: 15 Apr 2012, 05:28 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
yeah it is there in 77b5 so why can I not see it now?


Top
 Offline Profile  
 
 Post subject: Re: Fbi2Lua is broken.
PostPosted: 15 Apr 2012, 15:14 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
The `success` return argument isn't there for nothing.


Top
 Offline Profile  
 
 Post subject: Re: Fbi2Lua is broken.
PostPosted: 15 Apr 2012, 15:20 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
It was returning true btw. I also had to add some bs hack to get that far:

vfsutils.lua
Code:
function RecursiveFileSearch(startingDir, fileType, vfsMode)
  local files = {}
  local function AddSubDir(dir)
   --bs hack   
   if vfsMode == nil then
      vfsMode = VFS.RAW
   end
   --bs hack

   --Spring.Echo(dir, fileType, vfsMode)
    for _,file in ipairs(VFS.DirList(dir, fileType, vfsMode)) do
      files[#files + 1] = file
    end
    for _,sd in ipairs(VFS.SubDirs(dir, "*", vfsMode)) do
      AddSubDir(sd)
    end
  end

  AddSubDir(startingDir)

  return files
end


Top
 Offline Profile  
 
 Post subject: Re: Fbi2Lua is broken.
PostPosted: 16 Apr 2012, 00:45 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
It has some VFS issue I never investigated, cause it always worked when either run from lobby or spring.exe (forgot which one worked).


Top
 Offline Profile  
 
 Post subject: Re: Fbi2Lua is broken.
PostPosted: 16 Apr 2012, 01:23 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
possibly lobby, I was trying in spring.exe.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.