It is currently Sat Dec 07, 2019 7:31 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Add3DArchive() always returns 1
PostPosted: Sun Sep 29, 2019 1:23 pm 
Offline
Addict
Addict

Joined: Thu Aug 30, 2007 11:54 pm
Posts: 1155
Location: right here
Windows 10, PB 571 LTS x64
Doc for Add3DArchive() says:
Quote:
Returns non-zero if the path has been successfully added to the 3D resource list, zero otherwise.
Depending on what that means, it might not qualify as a bug, but the function will basically always return 1.
Code:
Debug InitEngine3D( )
Debug "----"
Debug Add3DArchive("", #PB_3DArchive_FileSystem)
Debug Add3DArchive("fg56z%B$& 7b4%/B 47$%B /8725838 ffd)(=&()", #PB_3DArchive_FileSystem)

Code:
1
----
1
1
Maybe add a check if the path exists, or add a comment to the return value doc that this should be checked by the programmer, for example via FileSize().


Top
 Profile  
Reply with quote  
 Post subject: Re: Add3DArchive() always returns 1
PostPosted: Sun Sep 29, 2019 8:50 pm 
Offline
Addict
Addict

Joined: Thu Aug 30, 2007 11:54 pm
Posts: 1155
Location: right here
On Linux it will always return 0, even if the directory exists. Ubuntu 18.04, x64.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye