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

Solved Frags.lua

Vrotz

Member
Joined
Apr 7, 2011
Messages
1,071
Reaction score
7
Location
Brazil
Hi!

How I do to fix this?!

PHP:
[9:23:39.434] > Loading talkactions... [Error - LuaInterface::loadFile] data/talkactions/scripts/frags.lua:2: ')' expected near 'then'
[9:23:39.434] [Error - Event::checkScript] Cannot load script (data/talkactions/scripts/frags.lua)
[9:23:39.434] data/talkactions/scripts/frags.lua:2: ')' expected near 'then'

Script:
PHP:
function onSay(cid, words, param, channel)
if isPlayer(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, You have a total of "..getFrags(cid).." frags.)
end
return true
end

Someone can help me? Tks.
 
Try adding parentheses before then =
PHP:
function onSay(cid, words, param, channel)
if (isPlayer(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, You have a total of "..getFrags(cid).." frags.)
end
return true
end
 
You are missing quotation marks on line 3.

Code:
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have a total of " .. getFrags(cid) .. " frags.")
 
Try adding parentheses before then =
PHP:
function onSay(cid, words, param, channel)
if (isPlayer(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, You have a total of "..getFrags(cid).." frags.)
end
return true
end


I get that
PHP:
[9:35:05.037] > Loading talkactions... [Error - LuaInterface::loadFile] data/talkactions/scripts/frags.lua:3: ')' expected near 'have'
[9:35:05.038] [Error - Event::checkScript] Cannot load script (data/talkactions/scripts/frags.lua)
[9:35:05.038] data/talkactions/scripts/frags.lua:3: ')' expected near 'have'
 
I get that
PHP:
[9:35:05.037] > Loading talkactions... [Error - LuaInterface::loadFile] data/talkactions/scripts/frags.lua:3: ')' expected near 'have'
[9:35:05.038] [Error - Event::checkScript] Cannot load script (data/talkactions/scripts/frags.lua)
[9:35:05.038] data/talkactions/scripts/frags.lua:3: ')' expected near 'have'
As ninja said add quotation marks to line 3 =

function onSay(cid, words, param, channel)
if (isPlayer(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have a total of "..getFrags(cid).." frags.")
end
return true
end
 
Back
Top