Yan18
Member
- Joined
- Jun 14, 2014
- Messages
- 104
- Solutions
- 3
- Reaction score
- 17
Hello everyone!
I'm learning C++ to developing my own server. I would like to understand somethings that I can't understand.
I have difficult in understading Lua_State *L. I understood the concept, but in the practice, I don't understand.
In the function above, the function has only unique parameter (Lua_State *L).
But in C++ (source) the function has an unique argument, why in the Lua the function has two parameters?
And the another doubt is, why some variables receive a kind of values like this:
This values like 0x10000000 is memory address? I would like to understand why some variables receive values like that.
Sorry if my doubts are obvious, I'm beginner in C++ yet.
I'm learning C++ to developing my own server. I would like to understand somethings that I can't understand.
I have difficult in understading Lua_State *L. I understood the concept, but in the practice, I don't understand.
C++:
int LuaScriptInterface::luaPlayerSendTextMessage(lua_State* L)
Lua:
player:sendTextMessage(MESSAGE_TYPE, "Text")
And the another doubt is, why some variables receive a kind of values like this:
Code:
Example 1 :
uint32_t Player::playerAutoID = 0x10000000;
------------------------------------------------------------------------------
Example 2:
Cylinder* Game::internalGetCylinder(Player* player, const Position& pos) const
{
if (pos.x != 0xFFFF)
{
return map.getTile(pos);
}
}
------------------------------------------------------------------------------
Example 3:
auto output = OutputMessagePool::getOutputMessage();
output->addByte(0x14);
Sorry if my doubts are obvious, I'm beginner in C++ yet.