lua/wrappers/game/lua_item.cpp
/**
	 * Sets the item postfix, nil is considered to be an empty string.
	 *
	 * @param string postfix The item postfix.
	 * @returns am.item This
	 */
Sets the item postfix, nil is considered to be an empty string.
@param string postfix The item postfix.
Sets the item postfix nil is considered to be an empty string . @param string postfix The item postfix .
int Item_postfix(lua_State *lua)
	{
		Item *item = castUData<Item>(lua, 1);
		if (item)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushstring(lua, item->getPostfix().c_str());
				return 1;
			}
			else if (lua_isstr(lua, 2))
			{
				item->setPostfix(lua_tostring(lua, 2));
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "postfix", "string postfix");
		}
		return LuaState::expectedContext(lua, "postfix", "am.item");
	}
int Item_postfix ( lua_State * lua ) { Item * item = castUData < Item > ( lua , 1 ) ; if ( item ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushstring ( lua , item -> getPostfix ( ) . c_str ( ) ) ; return 1 ; } else if ( lua_isstr ( lua , 2 ) ) { item -> setPostfix ( lua_tostring ( lua , 2 ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the item postfix, nil is considered to be an empty string.
Sets the item postfix nil is considered to be an empty string .