Hey i have som problems whit scripts whit require("pxlfs") on my linux server some there can help ?
Have install pack:
sudo apt-get install liblua5.1-0 liblua5.1-0-dev lua5.1 liblua5.1-filesystem0 liblua5.1-socket2 liblua5.1-sql-mysql-2 liblua5.1-sql-sqlite3-2 zlib1g-dev make g++
Thanks :)
Replace require("pxlfs") with require("lfs")
Thanks
Have try it before but it not work, but it work now :D
Are there a command so i can see the hub run on Linux or Win ?
/stats
QuoteVersion: PtokaX DC Hub 0.4.1.2c x64 built on Jul 9 2010 01:17:01
OS: Windows 7
QuoteVersion: PtokaX DC Hub 0.4.1.2c built on Oct 30 2010 23:06:42
OS: Linux 2.6.32.22 (x86_64)
hmm
where can i use that !
it is for somfing like this:
if os.px == linux then
require("lfs") -- LINUX
else
require("pxlfs") -- WIN
end
Lua API don't have call to check what on what OS PtokaX is running, simply because it is hard to do ::) Many systems returning crazy OS identification (for example wtf is SunOS 5.11 (i86pc) ?) :-X
You can use Core.GetPtokaXPath() to check if is running on Unix like system (path will start with /) 8)
Use this code
path,selfname = debug.getinfo(1).source:match("^@?(.+[/\\]).-[/\\](.-)$")
path = path:gsub("\\","/")
if path:find("^/") then -- OS detection
require "lfs" -- Linux
else
require"pxlfs" -- Windows
end
Hm, I copied this code from the working script.