• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Linux Complie Source

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Error:

Code:
Package libboost1.41-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libboost1.41-dev has no installation candidate

Command:

Code:
apt-get install libboost1.41-dev libboost-system1.41-dev libboost-filesystem1.41-dev libboost-date-time1.41-dev libboost-regex1.41-dev libboost-thread1.41-dev libgmp3-dev liblua5.1-0 liblua5.1-0-dev liblua50 liblua50-dev liblualib50 liblualib50-dev lua50 lua5.1 libsqlite0-dev libsqlite3-dev sqlite3 libmysql++-dev libmysqlclient-dev mysql-client-5.1 mysql-server-5.1 mysql-common libxml2-dev libxml++2.6-dev cpp gcc g++ make automake autoconf pkg-config subversion liblua5.1-sql-mysql-dev liblua5.1-sql-sqlite3-dev zlib1g-dev zlib1g libcrypto++-dev libcrypto++8

/etc/sources.list:

Code:
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free
deb ftp://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb-src ftp://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb http://mirror.home-dn.net/debian-multimedia squeeze main
deb http://www.debian-multimedia.org/ testing main
deb-src http://www.debian-multimedia.org/ testing main
deb http://www.debian-multimedia.org squeeze main
deb http://ftp.uk.debian.org/debian/ testing main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ testing main contrib non-fre

REP+
 
you seem to be using squeeze which is updated, so replace all "libboost*1.41" with "libboost*1.46" so basically put those lines in notepad++ and replace all "1.41" with "1.46"
 
Error:

Code:
make[1]: Entering directory `/root/trunk.r3884'
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2   -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__USE_SQLITE__   -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-unused-parameter -pipe -MT luascript.o -MD -MP -MF .deps/luascript.Tpo -c -o luascript.o luascript.cpp
luascript.cpp: In member function âbool LuaInterface::loadDirectory(const std::string&, Npc*, bool)â:
luascript.cpp:741:23: error: âclass boost::filesystem3::directory_entryâ has no member named âleafâ
luascript.cpp:744:61: error: no match for âoperator+â in âboost::filesystem3::path::filename() const() + "/"â
cc1plus: warnings being treated as errors
luascript.cpp: In static member function âstatic int32_t LuaInterface::luagetPlayerLastPing(lua_State*)â:
luascript.cpp:9691:10: error: unused variable âtimeNowâ
make[1]: *** [luascript.o] Error 1
make: *** [all] Error 2

Line: 741:

[cpp]std::string s = it->leaf();[/cpp]

Line 744:

[cpp]if(recursively && !loadDirectory(it->path().filename() + "/" + s, npc, recursively))[/cpp]

Line 9691:

[cpp]int64_t timeNow = OTSYS_TIME();[/cpp]
 
Last edited:
remove this line:
Code:
int64_t timeNow = OTSYS_TIME();
replace this:
Code:
it->leaf()
with this:
Code:
it->path().filename().string()
and this:
Code:
it->path().filename()
to
Code:
it->path().filename().string()
 
Code:
luascript.cpp: In member function âbool LuaInterface::loadDirectory(const std::string&, Npc*, bool)â:
luascript.cpp:741:50: error: âconst struct std::stringâ has no member named âstringâ
luascript.cpp: In static member function âstatic int32_t LuaInterface::luadoPlayerSendPing(lua_State*)â:
luascript.cpp:9661:24: error: âtimeNowâ was not declared in this scope
make[1]: *** [luascript.o] Error 1
make[1]: Leaving directory `/root/trunk.r3884'
make: *** [all] Error 2

Line 741:

Code:
std::string s = it->path().filename().string()[B][COLOR="red"].string()[/COLOR][/B];

Line 9661:

[cpp]player->lastPing = timeNow;[/cpp]
 
Last edited:
Yes,so i put in red ;p

Code:
luascript.cpp: In static member function âstatic int32_t LuaInterface::luadoPlayerSendPing(lua_State*)â:
luascript.cpp:9661:24: error: âtimeNowâ was not declared in this scope
make[1]: *** [luascript.o] Error 1
make[1]: Leaving directory `/root/trunk.r3884'
make: *** [all] Error 2

Line 9661:

[cpp]player->lastPing = timeNow;[/cpp]

luascript.cpp: In static member function âstatic int32_t LuaInterface::luadoPlayerSendPing(lua_State*)â :

[cpp]int32_t LuaInterface::luadoPlayerSendPing(lua_State* L)[/cpp]
 
Last edited:
Code:
cc1plus: warnings being treated as errors
luascript.cpp: In static member function âstatic int32_t LuaInterface::luagetPlayerLastPing(lua_State*)â:
luascript.cpp:9691:10: error: unused variable âtimeNowâ
make[1]: *** [luascript.o] Error 1
make[1]: Leaving directory `/root/trunk.r3884'
make: *** [all] Error 2

Line 9691:

[cpp]int64_t timeNow = OTSYS_TIME();[/cpp]
 
all script:

[cpp]int32_t LuaInterface::luadoPlayerSendPing(lua_State* L)
{
//doPlayerSendPing(cid)
ScriptEnviroment* env = getEnv();
Player* player = env->getPlayerByUID(popNumber(L));
if(!player)
{
lua_pushboolean(L, false);
return 1;
}
int64_t timeNow = OTSYS_TIME();
player->lastPing = timeNow;
if(player->client)
{
player->client->sendPing();
lua_pushboolean(L, true);
}else{
lua_pushboolean(L, false);
}
lua_pushboolean(L, true);

return 1;
}
int32_t LuaInterface::luagetOtsysTime(lua_State* L)
{
//getOtsysTime()
lua_pushnumber(L, OTSYS_TIME());
return 1;
}
int32_t LuaInterface::luagetPlayerLastPing(lua_State* L)
{
//getPlayerLastPing(cid)
ScriptEnviroment* env = getEnv();
Player* player = env->getPlayerByUID(popNumber(L));
if(!player)
{
errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
lua_pushboolean(L, false);
return 1;
}
int64_t timeNow = OTSYS_TIME();
lua_pushnumber(L, player->lastPing);
return 1;
}
int32_t LuaInterface::luagetPlayerLastPong(lua_State* L)
{
//getPlayerLastPong(cid)
ScriptEnviroment* env = getEnv();
Player* player = env->getPlayerByUID(popNumber(L));
if(!player)
{
errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
lua_pushboolean(L, false);
return 1;
}
lua_pushnumber(L, player->lastPong);
return 1;
}[/cpp]
 
replace this:
Code:
int32_t LuaInterface::luagetPlayerLastPing(lua_State* L)
{
	//getPlayerLastPing(cid)
	ScriptEnviroment* env = getEnv();
	Player* player = env->getPlayerByUID(popNumber(L));
	if(!player)
	{
		errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
		 lua_pushboolean(L, false); 
		return 1;
	}
	int64_t timeNow = OTSYS_TIME();
	lua_pushnumber(L, player->lastPing);
	return 1;
}
with this:
Code:
int32_t LuaInterface::luagetPlayerLastPing(lua_State* L)
{
	//getPlayerLastPing(cid)
	ScriptEnviroment* env = getEnv();
	Player* player = env->getPlayerByUID(popNumber(L));
	if(!player)
	{
		errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
		 lua_pushboolean(L, false); 
		return 1;
	}
	lua_pushnumber(L, player->lastPing);
	return 1;
}
 
Code:
luascript.cpp:3272:9: error: expected initializer at end of input
make[1]: *** [luascript.o] Error 1
make[1]: Leaving directory `/root/trunk.r3884'
make: *** [all] Error 2

Line 3272:

[cpp]int32_t LuaInterface::luaDoPlayerFeed(lua_State* L)[/cpp]

All script:

[cpp]int32_t LuaInterface::luaDoPlayerRemoveItem(lua_State* L)
{
//doPlayerRemoveItem(cid, itemid, count[, subType = -1])
int32_t subType = -1;
if(lua_gettop(L) > 3)
subType = popNumber(L);

uint32_t count = popNumber(L);
uint16_t itemId = (uint16_t)popNumber(L);

ScriptEnviroment* env = getEnv();
if(Player* player = env->getPlayerByUID(popNumber(L)))
lua_pushboolean(L, g_game.removeItemOfType(player, itemId, count, subType));
else
{
errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
lua_pushboolean(L, false);
}

return 1;
}

int32_t LuaInterface::luaDoPlayerFeed(lua_State* L)
{
//doPlayerFeed(cid, food)
int32_t food = (int32_t)popNumber(L);

ScriptEnviroment* env = getEnv();
if(Player* player = env->getPlayerByUID(popNumber(L)))
{
player->addDefaultRegeneration((food * 1000) * 3);
lua_pushboolean(L, true);
}
else
{
errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
lua_pushboolean(L, false);
}

return 1;
}[/cpp]
 
Code:
otserv.cpp: In function âvoid signalHandler(int32_t)â:
otserv.cpp:188:8: error: âSIGHUPâ was not declared in this scope
otserv.cpp:193:8: error: âSIGTRAPâ was not declared in this scope
otserv.cpp:197:8: error: âSIGCHLDâ was not declared in this scope
otserv.cpp:201:8: error: âSIGUSR1â was not declared in this scope
otserv.cpp:206:8: error: âSIGUSR2â was not declared in this scope
otserv.cpp:210:8: error: âSIGCONTâ was not declared in this scope
otserv.cpp:215:8: error: âSIGQUITâ was not declared in this scope
otserv.cpp:220:8: error: âSIGTERMâ was not declared in this scope
otserv.cpp: In function âint main(int, char**)â:
otserv.cpp:281:19: error: aggregate âmain(int, char**)::sigaction sighâ has incomplete type   and cannot be defined
otserv.cpp:282:20: error: âSIG_IGNâ was not declared in this scope
otserv.cpp:285:27: error: âsigemptysetâ was not declared in this scope
otserv.cpp:286:12: error: âSIGPIPEâ was not declared in this scope
otserv.cpp:286:32: error: invalid use of incomplete type âstruct main(int, char**)::sigacti  onâ
otserv.cpp:281:9: error: forward declaration of âstruct main(int, char**)::sigactionâ
otserv.cpp:289:9: error: âSIGHUPâ was not declared in this scope
otserv.cpp:289:30: error: âsignalâ was not declared in this scope
otserv.cpp:290:9: error: âSIGTRAPâ was not declared in this scope
otserv.cpp:291:9: error: âSIGCHLDâ was not declared in this scope
otserv.cpp:292:9: error: âSIGUSR1â was not declared in this scope
otserv.cpp:293:9: error: âSIGUSR2â was not declared in this scope
otserv.cpp:294:9: error: âSIGCONTâ was not declared in this scope
otserv.cpp:295:9: error: âSIGQUITâ was not declared in this scope
otserv.cpp:296:9: error: âSIGTERMâ was not declared in this scope
make[1]: *** [otserv.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/outfit.Tpo .deps/outfit.Po
mv -f .deps/npc.Tpo .deps/npc.Po
make[1]: Leaving directory `/root/trunk.r3884'
make: *** [all] Error 2


OTServ:

188:
Code:
case SIGHUP:

193:
Code:
case SIGTRAP:
197:
Code:
case SIGCHLD:
201:
Code:
case SIGUSR1:
206:
Code:
case SIGUSR2:
210:
Code:
case SIGCONT:
215:
Code:
case SIGQUIT:
220:
Code:
case SIGTERM:
281:
Code:
struct sigaction sigh;
282:
Code:
sigh.sa_handler = SIG_IGN;
285:
Code:
sigemptyset(&sigh.sa_mask);
286:
Code:
sigaction(SIGPIPE, &sigh, NULL);
290:
Code:
signal(SIGTRAP, signalHandler); //clean
291:
Code:
signal(SIGCHLD, signalHandler); //refresh
292:
Code:
signal(SIGUSR1, signalHandler); //close server
293:
Code:
signal(SIGUSR2, signalHandler); //open serv
294:
Code:
signal(SIGCONT, signalHandler); //reload all
295:
Code:
signal(SIGQUIT, signalHandler); //save & shutdown
 
Back
Top