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

compiling error

Nothxbye

Banned User
Joined
Jan 22, 2012
Messages
1,124
Reaction score
174
Jak fixnąc ten error, pasowalo by jakoś zastąpić tą linijke innym kodem.

Code:
int32_t LuaScriptInterface::luaDatabaseEscapeBlob(lua_State* L)
{
	uint32_t length = popNumber(L);
	DBQuery query;

	lua_pushstring(L, Database::instance()->escapeBlob(popString(L).c_str(), length).c_str()); ---- [COLOR="#FF0000"]Chodzi o ta linijke[/COLOR]
	return 1;
}

Code:
const char* LuaScriptInterface::popString(lua_State *L)
{
	lua_pop(L,1);
	const char* str = lua_tostring(L, 0);
	if(!str || strlen(str) == 0){
        return "";
    }

	return str;
}

error C2228: left of '.c_str' must have class/struct/union
type is 'const char *'
 
Back
Top