Forum

> > CS2D > Scripts > 2 Lua Errors tibia and 1 other thing
Forums overviewCS2D overview Scripts overviewLog in to reply

English 2 Lua Errors tibia and 1 other thing

6 replies
To the start Previous 1 Next To the start

old 2 Lua Errors tibia and 1 other thing

Lilliana01838
User Off Offline

Quote
I have two lua errors here and I also tried to fix it but failed


LUA ERROR: sys/lua/cs2dtibia/mod.lua:23: attempt to call global 'isMod' (a nil value)
-> sys/lua/cs2dtibia/mod.lua:23: in function <sys/lua/cs2dtibia/mod.lua:22>
-> in Lua hook 'say', params: 1, '!s'

22     function modCommands(id,words)
23          if isMod(id) and words:sub(1,1) =='!' then



LUA ERROR: sys/lua/cs2dtibia/hooks.lua:346: bad argument #1 to 'time' (table expected, got number)
-> [C]: in function 'time'
-> sys/lua/cs2dtibia/hooks.lua:346: in function <sys/lua/cs2dtibia/hooks.lua:341>


341     function EXPminute()
342          MINUTES = MINUTES+1
343          MONSTERESET = 10
344          for i, v in ipairs(HOUSES) do
345               if v.owner then
346                    local difftime = os.time(v.endtime, os.time())



I have the problem that I am chatting twice with the same message, I also tried to fix it but failed

old Re: 2 Lua Errors tibia and 1 other thing

Mami Tomoe
User Off Offline

Quote
user Lilliana01838 has written
LUA ERROR: sys/lua/cs2dtibia/mod.lua:23: attempt to call global 'isMod' (a nil value)
-> sys/lua/cs2dtibia/mod.lua:23: in function <sys/lua/cs2dtibia/mod.lua:22>
-> in Lua hook 'say', params: 1, '!s'

22     function modCommands(id,words)
23          if isMod(id) and words:sub(1,1) =='!' then



LUA ERROR: sys/lua/cs2dtibia/hooks.lua:346: bad argument #1 to 'time' (table expected, got number)
-> [C]: in function 'time'
-> sys/lua/cs2dtibia/hooks.lua:346: in function <sys/lua/cs2dtibia/hooks.lua:341>


341     function EXPminute()
342          MINUTES = MINUTES+1
343          MONSTERESET = 10
344          for i, v in ipairs(HOUSES) do
345               if v.owner then
346                    local difftime = os.time(v.endtime, os.time())


First error: the function
isMod(p)
does not exist, make it.
Second error: you are misusing the
os.time
function, did you mean
os.difftime
?

Double text happens when you have more than one say hook, share all of your say hooks here, or combine them yourself.

You could also
return 1
on the least needed one. (not recommended)




user The Dark Shadow has written
Multiple Account as user haha1955

Wrong, shes his GF or something.




user haha1955 has written
Why need i Multiple Account? Dc can u ban this guy forum? I guess he have a joke Account.

Stop getting triggered by everything, please.

old Re: 2 Lua Errors tibia and 1 other thing

haha1955
User Off Offline

Quote
No, i dont stop. First learn you guys all the rules then i stop. Here is not a Circus or something shit, here is a community Who where need help or share something files, Screenshots, Videos etc.

If dont want to help then dont comment.


@user DC: tell me if im wrong.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview