PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: Tom on 23 January, 2005, 14:56:28

Title: Please help me!
Post by: Tom on 23 January, 2005, 14:56:28
Hi guys,

 I need help.

I have the script in Lua 4 and I convert it to the Lua 5.0.2,
but one part,  I don't know how I converted it.

              This is the part:

function SaveToFile(file , table , tablename)
   writeto(file)
   write(Serialize(table, tablename))
   writeto()
end

function LoadFromFile(file)
   if (readfrom(file) ~= nil) then
      readfrom(file)
      dostring(read("*all"))
      readfrom()

I don't know what is it.

Please, can you somebody help me and convert it into the Lua 5.0.2.


  Please!!!
Title:
Post by: bastya_elvtars on 23 January, 2005, 16:06:02
yes, if you post the script.
Title:
Post by: Tom on 23 January, 2005, 16:17:45
OK.
Here is it.

Is it the CHAT ROOMS CREATOR BOT 1.0 by nErBoS.

 You can find the sciript here, it is too long for this message:
    http://nerbos.go.dyndns.org/Chat-Room.lua
 
 PLEASE HELP ME with converting this script to LUA 5.0.2.
 Thanks you very much!
Title:
Post by: plop on 23 January, 2005, 17:52:51
dofile("datafile") does the same as the loadfromfile function.
the save function can be converted with 425.lua.

plop