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

Lua LOOKING FOR A Pr0lack TO FIX MY SCRIPT! [REP++ OR $]

_Arthur

Joined
Oct 22, 2009
Messages
2,190
Reaction score
143
Solved. <3


=


06:38 You see Eh. He is on Ascension # 3. He is on Ascension # 4. He is on Ascension # 5 (Level 8). He is a knight.


=

FAIL.
 
Last edited:
It adds another description while reborn instead of erasing previous and setting new, function failure tho.
 
Try this...

Code:
doPlayerSetSpecialDescription(cid, (getPlayerSex(cid) == 0 and ".\nShe" or ".\nHe") .. " is on Ascension # " .. new .. ".")

You were setting the wrong thing, over and over again.
 
You keep trying to set the NAME of the player, you can't do this.
You need to set THE DESCRIPTION.

Code:
You see John. (Level 8). He is a knight.
He is on Asension # 1.
 
SetSpecialDescription makes it so nothing in the name changes... like...
07:53 You see Gaesgse (Level 8). She is a knight.
 
You keep trying to set the NAME of the player, you can't do this.
You need to set THE DESCRIPTION.

Code:
You see John. (Level 8). He is a knight.
He is on Asension # 1.

But description function fails, look;

Player doesn't have description, then you use function to set his description, you set description to 'JDB #1', then after a while you set description to 'JDB #2', but function instead of over-write description, adds the content, so the output is: 'JDB #1JDB #2', got it?
 
But description function fails, look;

Player doesn't have description, then you use function to set his description, you set description to 'JDB #1', then after a while you set description to 'JDB #2', but function instead of over-write description, adds the content, so the output is: 'JDB #1JDB #2', got it?

That's how I did it on my server, don't know why the function isn't working for you.
 
That's how I did it on my server, don't know why the function isn't working for you.

It's not me, it's just fact:
Code:
int32_t LuaInterface::luaDoPlayerSetNameDescription(lua_State* L)
{
	//doPlayerSetNameDescription(cid, description)
	std::string description = popString(L);

	ScriptEnviroment* env = getEnv();
	if(Player* player = env->getPlayerByUID(popNumber(L)))
	{
		player->nameDescription [B][COLOR="red"]+=[/COLOR] [/B] description;
		lua_pushboolean(L, true);
	}
	else
	{
		errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
		lua_pushboolean(L, false);
	}

	return 1;
}
 
Back
Top