- When walking, "attempt to call a nil value" error appears in the console.
- When removing the hook, no errors appear.
- When changing the functions inside the hook, error remains.
- Renaming the function makes one more error appear (means now there are two same errors). Renaming the function further makes one more error appear, etc. I've got like 8 errors by now.
I don't have ANY idea what is this, but everything works fine, perfect, except for these damn errors.
The hook code and a function it calls:
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
function rconv(id,x,y) local rx=x-xfactor local ry=y-yfactor return 1+(3*(ry-1))+(rx-1) end addhook("movetile","rouletteconv") function rouletteconv(id,x,y) if (player(id,"x")>=rsx and player(id,"x")<=rex and player(id,"y")>=rsy and player(id,"tily")<=rey) then roulettenumber[id]=rconv(id,x,y) hudtxt2(id,1,"255255255","Your roulette number is "..roulettenumber[id],250,25) end end
I've had this problem before, and solved it, but, sadly, forgot the way to solve it. Has anyone else encountered that and how do I make the errors disappear?!