• 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!

Print in 0.2..

Status
Not open for further replies.

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,984
Solutions
2
Reaction score
119
Location
Germany
GitHub
Shawak
Just a litle question, I used 0.3~ a long time, there was the function print(""), but the function dont wotk with 0.2..
So my question, what function should I ust to print sth.?

Regards,
Shawak
 
Nope... you can go copy the 0.3.5 print function in your 0.2 in 5 sec, or make your own in 7 sec xd... i guess is simple std::cout what you want =o
 
found for you...

luascript.cpp anywhere

Code:
int32_t LuaScriptInterface::luaPrint(lua_State* L)
{
   std::cout << popString(L) << std::endl;
   lua_pushnil(L);
   return 1;
}

luascript.cpp after

Code:
void LuaScriptInterface::registerFunctions()
{

put

Code:
lua_register(m_luaState, "print", LuaScriptInterface::luaPrint);

luascripts.h

Inside

Code:
class LuaScriptInterface
{

after protected:, add

Code:
static int32_t luaPrint(lua_State* L);

I sucks making "guides" and shit, never made one, also i did avoid some explaination for u, i think is not needed.

------

edit:

ah, if broadcast works for u, then ok =d
 
ofc... maybe some library are different or so... if your on windows i guess you wont have any problems if you use theForgottenServer dev c++ or soemthing like that... the dev c++ that you can download somewhere in this forum and have all the boost libs and the rest of the required libs to compile TFS
 
Last edited:
ofc... maybe some library are different or so... if your on windows i guess you wont have any problems if you use theForgottenServer dev c++ or soemthing like that... the dev c++ that you can download somewhere in this forum and have all the boost libs and the rest of the required libs to compile TFS

I think I'll change back to 0.3.5 :peace:.
 
Status
Not open for further replies.
Back
Top