• 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 quiz problem

xkevinz

Member
Joined
Aug 15, 2007
Messages
358
Reaction score
5
35ld8w2.png
This is the error I am getting, everytime I type /quiz, nothing happens it just comes out as a default chat and i get that error in my console, any suggestions?

Here is the talkaction part of the script unless whole script is needed.

]]></globalevent>
<talkaction words = "/quiz" event = "script"><![CDATA[
domodlib("config")
function onSay(cid, words, param)
if(param) then
if(getGlobalStorageValue(config.storage)) then
for _, v in pairs(config.questions) do
if(v.question == getGlobalStorageValue(config.storage)) then
if(string.lower(param) == v.answer) then
doBroadcastMessage("[POP QUIZ]: " .. getPlayerName(cid) .. " has answered the question: " .. v.question .. ", with answer: " .. v.answer .. ". Congratulations to the winner!", MESSAGE_EVENT_ADVANCE)
doPlayerAddItem(cid, 5957, 1)
setGlobalStorageValue(config.storage, nil)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
return true
end
end
end
else
doPlayerSendCancel(cid, "The quiz has already ended.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
end
else
doPlayerSendCancel(cid, "The answer must be stated in parameter.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
end
doPlayerSendCancel(cid, "This answer is wrong.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return true
end
]]></talkaction>
</mod>
 
yeah i already did but everytime i do /quiz, it comes out as default chat and has no effect igname but gives me that console error
 

Similar threads

Back
Top