just started running this script an i get the following error :
Syntax cannot read wordreplace/tLadys.lua: No such file or directory
Syntax ...UA 5)\scripts\zzword_replacer_1.2.lua_5.0_public.lua:253: attempt to index local `fFile' (a nil value)
Fatal error in script zzword_replacer_1.2.lua_5.0_public.lua ! Script stopped!
Script started.
A fix would be greatly appreciated t/y
open the lua file in a editor ..
then find this part
function Main()
local num = string.gsub(os.date(), "%D", "")
math.randomseed(tonumber(num))
dofile("wordreplace/tLadys.lua")
dofile("wordreplace/tBadWords.lua")
dofile("wordreplace/tBadFunctions.lua")
local fFile = io.open("wordreplace/tHistory.lua")
if fFile then
dofile("wordreplace/tHistory.lua")
fFile:close()
end
if iRegBot then
frmHub:RegBot(sBot, 1, "friendly wordreplacer<[URL]www.plop.nl[/URL]>", "lua.plop.nl")
end
end
and change it to this part
function Main()
local num = string.gsub(os.date(), "%D", "")
math.randomseed(tonumber(num))
--dofile("wordreplace/tLadys.lua")
dofile("wordreplace/tBadWords.lua")
dofile("wordreplace/tBadFunctions.lua")
local fFile = io.open("wordreplace/tHistory.lua")
if fFile then
dofile("wordreplace/tHistory.lua")
fFile:close()
end
if iRegBot then
frmHub:RegBot(sBot, 1, "friendly wordreplacer<[URL]www.plop.nl[/URL]>", "lua.plop.nl")
end
end
that should fix the problem...
Typhoon?
ok t/y i will try that and get back to you
for the life of me i couldn't see what was changed but it works like a charm t/y
slick
Hmm, I was thinking of this:
local num = string.gsub(os.date(), "%D", "")
math.randomseed(tonumber(num))
Wouldn't it be easier to:
math.randomseed(os.time())
QuoteOriginally posted by slick
for the life of me i couldn't see what was changed but it works like a charm t/y
slick
your welcome slick :)
and to Bastya
tell plop that :)
Typhoon?
QuoteOriginally posted by bastya_elvtars
Hmm, I was thinking of this:
local num = string.gsub(os.date(), "%D", "")
math.randomseed(tonumber(num))
Wouldn't it be easier to:
math.randomseed(os.time())
would be easier indeed.
but it's not a real waste as it's only triggered 1x (at script startup).
plop