Print in 0.2..

Status
Not open for further replies.

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,976
Best answers
2
Reaction score
101
Location
Germany
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
 

nclx

Member
Joined
Jul 18, 2009
Messages
556
Best answers
0
Reaction score
15
debugPrint("sry, im not sure if this works, not even sure abt what u want xD")
 
OP
Shawak

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,976
Best answers
2
Reaction score
101
Location
Germany
debugPrint("sry, im not sure if this works, not even sure abt what u want xD")
Isn't there anything better?
Like the 0.3.5 printing?
 
Last edited:

nclx

Member
Joined
Jul 18, 2009
Messages
556
Best answers
0
Reaction score
15
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
 
OP
Shawak

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,976
Best answers
2
Reaction score
101
Location
Germany
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
I'll use braodcast, same result.
 

nclx

Member
Joined
Jul 18, 2009
Messages
556
Best answers
0
Reaction score
15
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
 
OP
Shawak

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,976
Best answers
2
Reaction score
101
Location
Germany
I think I'll use yours, thanks nclx, just one question, can I compile 0.2 like 0.3`?
 

nclx

Member
Joined
Jul 18, 2009
Messages
556
Best answers
0
Reaction score
15
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:
OP
Shawak

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,976
Best answers
2
Reaction score
101
Location
Germany
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.
Top