• 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 doRemoveCondition - lib problem?

OTcreator

Well-Known Member
Joined
Feb 14, 2022
Messages
495
Solutions
1
Reaction score
56
Hello!
I noticed , in TFS 1.4.2 using this call:

LUA:
doRemoveCondition(cid, CONDITION_ATTRIBUTES, 157)

Everything works fine. But when we change the code to the new style, it doesn't work. What could be wrong?

LUA:
player:removeCondition(CONDITION_ATTRIBUTES, 157)
 
You're forgetting to give the conditionId.
Use whatever one is appropriate for your situation.
LUA:
player:removeCondition(CONDITION_ATTRIBUTES, CONDITIONID_COMBAT, 157)
player:removeCondition(CONDITION_ATTRIBUTES, CONDITIONID_DEFAULT, 157)
 
You're forgetting to give the conditionId.
Use whatever one is appropriate for your situation.
LUA:
player:removeCondition(CONDITION_ATTRIBUTES, CONDITIONID_COMBAT, 157)
player:removeCondition(CONDITION_ATTRIBUTES, CONDITIONID_DEFAULT, 157)

local cond = ... (this is ID sure?)
Now working good, thank you!
 
Back
Top