English 2 Lua Errors tibia and 1 other thing

6 replies
Goto Page
To the start Previous 1 Next To the start
Up
Lilliana01838
User
Offline Off
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
10.01.20 11:59:19 am
Up
haha1955
User
Offline Off
Why need i Multiple Account? Dc can u ban this guy forum? I guess he have a joke Account.
10.01.20 01:37:35 pm
Up
Goo
User
Offline Off
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 kennyS 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.
10.01.20 01:50:26 pm
Up
haha1955
User
Offline Off
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.
10.01.20 01:58:00 pm
Up
Goo
User
Offline Off
@user haha1955: if you do not know how to ask for help, then don't.

Arguing back isn't a good thing either.
10.01.20 02:30:14 pm
Up
haha1955
User
Offline Off
dont worry, i know how to ask for help.

yes its not a good thing.
To the start Previous 1 Next To the start