help error running word replacer
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

help error running word replacer

Started by slick, 21 September, 2005, 13:44:02

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

slick

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

Typhoon

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?



slick

ok t/y i will try that and get back to you

slick

for the life of me i couldn't see what was changed but it works like a charm t/y



slick

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())
Everything could have been anything else and it would have just as much meaning.

Typhoon

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?



plop

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
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

SMF spam blocked by CleanTalk