Seniru / pewpew

Transformice module #pewpew

Home Page:https://atelier801.com/topic?f=6&t=892463

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Attempt to index a nil value

Seniru opened this issue · comments

The logs mentioned below:

# [*#pewpew1] Runtime Error : org.luaj.vm2.LuaError: King_seniru#5890.lua:863: attempt to index ? (a nil value)

And the line in the index.lua would be...

skin.adj.x,

Possibly it could be a missing skin adjustment

By investigating further, I found that the reason for this is "Random" pack having skins but not adjustments. Also the "random" pack's adjustment are not ignored like in "Default" pack

if self.equipped ~= "Default" and skin and skin.image then

The following line could fix it without working much on it

		if (self.equipped ~= "Default" or self.equipped ~= "Random") and skin and skin.image then

Actually it couldn't be that because it worked alright with the "random" pack before

I feel this bug is not happening anymore, so closing it!