Problem in LV_3.1.lua
 

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

Problem in LV_3.1.lua

Started by baba.runner, 21 March, 2007, 00:01:53

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

baba.runner

Hi all

I always get the following error
Quote[23:29] Syntax ...:\PTOKAX TESTHUB\PTOKAX 0.3.5.2g1\scripts\LV_3.1.lua:514: attempt to index local 'hFile' (a nil value)
[23:29] Syntax ...:\PTOKAX TESTHUB\PTOKAX 0.3.5.2g1\scripts\LV_3.1.lua:514: attempt to index local 'hFile' (a nil value)
[23:29] Fatal error in script LV_3.1.lua ! Script stopped!
[23:29] Syntax ...:\PTOKAX TESTHUB\PTOKAX 0.3.5.2g1\scripts\LV_3.1.lua:514: attempt to index local 'hFile' (a nil value)
[23:29] Syntax ...:\PTOKAX TESTHUB\PTOKAX 0.3.5.2g1\scripts\LV_3.1.lua:514: attempt to index local 'hFile' (a nil value)

and the line 514 is the following:
QuotehFile:write(sTab..sTableName.." = {\n")

Here is the whole involved paragraphe:
QuoteSerialize = function(tTable,sTableName,hFile,sTab)
   sTab = sTab or ""
   hFile:write(sTab..sTableName.." = {\n")
   for key,value in pairs(tTable) do
      if (type(value) ~= "function") then
         local sKey = (type(key) == "string") and string.format("[%q]",key) or string.format("[%d]",key)
         if(type(value) == "table") then
            Serialize(value,sKey,hFile,sTab.."\t")
         else
            local sValue = (type(value) == "string") and string.format("%q",value) or tostring(value)
            hFile:write(sTab.."\t"..sKey.." = "..sValue)
         end
         hFile:write(",\n")
      end
   end
   hFile:write(sTab.."}")
end

Thanks in advance for your assistance.

KR
baba.runner

Madman

Serelize look good.
But it most likely error some where else, what did you do when you got this error?
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

baba.runner

I was doing nothing special. Just looking at the script why I got this error.
That's all
I checked all my logs and I found nothing special.

Perhaps the analyse of what this serialize is doing and when does it do it, will help. But therefor you have to know the script very well :D

bastya_elvtars

Now I wish stack traceback worked...
Everything could have been anything else and it would have just as much meaning.

Madman

Quote from: baba.runner on 21 March, 2007, 23:18:35
Perhaps the analyse of what this serialize is doing and when does it do it, will help. But therefor you have to know the script very well :D

Serialize saves tabels to file, so to find this error, we would need to check every line that calls the function SaveToFile...
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Cêñoßy†ê

Hmm.. leviathan as first script on ptokax ?
Powered By Leviathan™ 2nd Generation v. 1.9

baba.runner

No. I have Leviathan in 4th place, as I use an seperate AFK script, and ASCII script and a seperate Slot script. And I have to put them befor Levi, as otherwhise they do not work correctly.

Cêñoßy†ê

and this way levi wont work correctly ;)
Powered By Leviathan™ 2nd Generation v. 1.9

baba.runner

Yes, I remarked. But please tell me why and perhaps I can resolve it.

BTW: In regard to the slotbot do you want me to make a new thread or shall I write it in this thread?

SMF spam blocked by CleanTalk