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

TFS 1.2 getCondint a nil value on talkaction

Lopaskurwa

Active Member
Joined
Oct 6, 2017
Messages
870
Solutions
2
Reaction score
49
Trying to create !showpztime talkaction but stuck with getCondition a nil value error, checked my previous codes that uses getCondition pretty much all of them created exactly the same, but it doesnt want to work this time
Lua:
function onSay(cid, words, param, channel)
    if getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT) then
    return doPlayerSendCancel(cid, "You Don't Have Pz") and doSendMagicEffect(getThingPos(cid), 2)
    end
    doPlayerSendTextMessage(cid,27, "You Have To Wait "..getInFightTicks(cid).." Second For Pz.")
    return true
end
 
Normally you want to target the creature you are checking for the condition.

so instead of
getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT)
it would be
cid:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT)
 
Normally you want to target the creature you are checking for the condition.

so instead of
getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT)
it would be
cid:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT)
something isnt right with the code tho, for some reason it ignores the first line
 
Back
Top