PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: Cboy301 on 16 February, 2004, 03:33:00

Title: Multiple Script Loading
Post by: Cboy301 on 16 February, 2004, 03:33:00
Hi! I looking for a script to make all my scripts load as one. I have 9 scripts and its kinda confusing. Thanks!
Title:
Post by: [NL]trucker on 16 February, 2004, 08:46:29
Cboy301

A; this is not the right section to post it m8 next time post this one in the help section i think it belongs there.

B: if you put the scripts in the dir pkotax\scripts they will
    be automatticly loaded when you start the hub.

So i cant see a reason to have a script that does that.

c: if you mean you want to have just one script showing  in main just give the scripts 1 botname
that way it looks you only have 1 script running ;

or

D: if you see something like this line in script:

BotName = "xxxxxxxxx"

function Main()
frmHub:RegBot(BotName)
end


just put this -- in front of the lines like this


BotName = "xxxxxxxx"

--function Main()
--frmHub:RegBot(BotName)
--end

that way the lines arent processed and the botname isnt showing in main.

hope this helped a bit.
Title:
Post by: kepp on 16 February, 2004, 12:19:47
If you mean that you would rather have one script Loaded instead of 9 you can dofile the files from 1 script


Path = "DATA\"
dofile(Path.."file1.lua")
dofile(Path.."file2.lua")
dofile(Path.."file3.lua")
dofile(Path.."file4.lua")
dofile(Path.."file5.lua")
dofile(Path.."file6.lua")
dofile(Path.."file7.lua")
dofile(Path.."file8.lua")
dofile(Path.."file9.lua")

So you will need all files in a folder Called "DATA"

else if you want all files as a one script you can request in 'HELP' section or something similiar for people to help you!