Lua
local adpreis = 50
addCommandHandler("ad",function(thePlayer, cmd, ...)
local money = getPlayerMoney(player)
if(money < adpreis+1) then outputChatBox("Du benoetigst "..adpreis.." �, um eine Werbung zu schreiben!", player, 255, 0, 0, false) return end
outputChatBox("Bitte geb einen Text ein!", thePlayer, 200, 0, 0) return end
local text = table.concat( {...}, " " )
givePlayerMoney(player, -50)
outputChatBox("[Werbung]"..getPlayerName(thePlayer)..": "..text.."", getRootElement(), 255, 255, 255)
end)
Alles anzeigen
was ist der fehler ?
ad.lua:7: ')' expected (to close '(' at line 3) near 'local'
ad.lua:7: ')' expected (to close '(' at line 3) near 'local'