Apparently an error appears on the line 50, 'attempt to concatenate a nil value'. I refuse to understand it because the debug messages that show the functions' return values show them okay and nothing else can theoretically be nil. I tried restarting the game (CS2D can sometimes glitch up a bit) - no effect. Please help if you can. I'll provide all the necessary extra info.
Forum
CS2D Scripts [Lua Problem] An error I refuse to understand[Lua Problem] An error I refuse to understand
2 replies 1
Apparently an error appears on the line 50, 'attempt to concatenate a nil value'. I refuse to understand it because the debug messages that show the functions' return values show them okay and nothing else can theoretically be nil. I tried restarting the game (CS2D can sometimes glitch up a bit) - no effect. Please help if you can. I'll provide all the necessary extra info.
Since getweapon is
1
2
3
4
5
2
3
4
5
function getweapon(b,n) 	if (basedata[b].hardware[n]~=nil) then 		return equipment[basedata[b].hardware[n].type].name.."|"..equipment[basedata[b].hardware[n].type].price 	end end
this returns nil if basedata[b].hardware[n] is nil.
1
return ""
1