--lua5(by Dessamator)
-- Wave by DirtyFingers
-- on/off and more.. by Hawk
-- only ops can start/stop the wave by yepyepyep4711 (no, I don't expect anyone to be impressed ;D)
wavepart = "??..??''???``''??..??_"
-- 1234567890123456789012
pos = 1
wholewave = string.rep(wavepart,4)
active = 0
function Main()
SetTimer(200)
end
function OnTimer()
if pos > 1 then
pos = pos-1
else
pos = 22
end
local c = string.sub(wavepart,pos,pos)
wholewave = c..string.sub(wholewave,1,string.len(wholewave)-1)
--SendToAll("",c.."\t"..string.sub(wholewave,string.len(wholewave)-1,string.len(wholewave)-1))
SendToAll("*",wholewave.." <*>")
end
function ChatArrival (curUser, sData)
command=string.sub(sData,1,string.len(sData)-1)
s,e,cmd = string.find(command,"%b<>%s+(%S+)")
if curUser.bOperator then
if cmd=="+waveon" then
StartTimer()
active = 1
elseif cmd=="+waveoff" then
StopTimer()
active = 0
end
end
if active ~= 0 then
local s,i
_,i = (string.find(sData,"<"..curUser.sName.."> "))
if i ~= nil then
s = string.sub(sData,i+1,string.len(sData)-1)
if ( string.sub(sData, 1, 4) == "$To:" ) then
s,e,g,h,j = string.find(sData,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")
j = string.sub(j,1,string.len(j)-1)
SendPmToNick(g,h,j)
else
if string.len(s) < string.len(wholewave) then
wholewave = s .. string.sub(wholewave,string.len(s))
else
wholewave = string.sub(s,string.len(wholewave))
end
end
end
return 1
end
end
i keep getting this message
wave.lua:8: function arguments expected near `='
QuoteOriginally posted by ~~~~?Master?~~~~
i keep getting this message
wave.lua:8: function arguments expected near `='
no errors here, try to copy the script again !!
i tryed butt kept getting the same msg
strange.....
btw there are a lote of scripts that don't work at my ptokax...
QuoteOriginally posted by jiten
QuoteOriginally posted by ~~~~?Master?~~~~
i'm keep getting this msg function arguments expected near `=' in line 8
can you help me??
thnx greetzz
What PtokaX version are you using?
Btw, the code to copy is the one between the
Best regards,
jiten
QuoteOriginally posted by ~~~~?Master?~~~~
i keep getting this message
wave.lua:8: function arguments expected near `='
must be u that copy it wrong
works perfect for me :]
it works i found the problem.......jumble was messing with the script..... thnx anyway
\scripts\wave.lua:43: malformed pattern (missing `]')
I get this error in ptokax script editor, when i start the wave...
Anybody knows what`s the problem?
Thanks... ;)