Author Topic: is download.txt not working  (Read 2781 times)

0 Members and 3 Guests are viewing this topic.

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
is download.txt not working
« on: April 28, 2013, 06:16:03 PM »
is download.txt not work i added a dir and nothing downloaded from it
models/humans/nypd
Aren't there normally a vtf or some other file explaining some properties of the mdl file that is required?
(I forget if it's necessary for ULX, my team may correct me)

Also, Where did you place your edited copy?
sorry wrong dir i edited the line to show the actual dir
in that dir nothing downloaded correctly for some reason
the vtf is 'sold separately' If you pass the model and not the texture, it will still display, it'll just have the 'missing texture' texture.
the file would still download anyways and show up localy right ?

ps: ill take a dive at this some time i wanted to post here first to see if i was doing anything stupid :(
« Last Edit: April 30, 2013, 06:11:58 AM by nathan736 »
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: is download.txt not working
« Reply #1 on: April 28, 2013, 07:54:03 PM »
Aren't there normally a vtf or some other file explaining some properties of the mdl file that is required?
(I forget if it's necessary for ULX, my team may correct me)

Also, Where did you place your edited copy?
« Last Edit: April 28, 2013, 07:55:56 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: is download.txt not working
« Reply #2 on: April 28, 2013, 08:55:14 PM »
the vtf is 'sold separately' If you pass the model and not the texture, it will still display, it'll just have the 'missing texture' texture.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: is download.txt not working
« Reply #3 on: April 29, 2013, 07:32:23 AM »
Created an issue to check to make sure it's still working: https://github.com/Nayruden/Ulysses/issues/205
Experiencing God's grace one day at a time.

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: is download.txt not working
« Reply #4 on: April 30, 2013, 08:57:38 AM »
https://github.com/Nayruden/Ulysses/blob/master/ulx/lua/ulx/modules/sh/util.lua#L213
Code: [Select]
function ulx.addForcedDownload( path )
if ULib.fileIsDir( path ) then
files = ULib.filesInDir( path )
for _, v in ipairs( files ) do
ulx.addForcedDownload( path .. "/" .. v )
end
elseif ULib.fileExists( path ) then
resource.AddFile( path )
else
Msg( "[ULX] ERROR: Tried to add nonexistent or empty file to forced downloads '" .. path .. "'\n" )
end
end
https://github.com/Nayruden/Ulysses/blob/master/ulx/lua/ulx/end.lua#L15
Code: [Select]
local function doDownloadCfg( path )
-- Does the module exist for this?
if not ulx.addForcedDownload then
return
end

local lines = ULib.explode( "\n+", ULib.stripComments( ULib.fileRead( path ), ";" ) )
for _, line in ipairs( lines ) do
line = line:Trim()
if line:len() > 0 then
ulx.addForcedDownload( ULib.stripQuotes( line ) )
end
end
end
does this ever come back true ?
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: is download.txt not working
« Reply #5 on: April 30, 2013, 10:30:38 AM »
If you're talking about "if not ulx.addForcedDownload then", it's merely checking for the presence of the function, not checking if the function returns a certain value.
Experiencing God's grace one day at a time.

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: is download.txt not working
« Reply #6 on: April 30, 2013, 11:00:09 AM »
ah ok never knew you could do that ;)
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: is download.txt not working
« Reply #7 on: April 30, 2013, 11:02:43 AM »
Part of the reason why I love Lua is that pretty much everything (including functions) is a first class citizen.
Experiencing God's grace one day at a time.