Returning values in loops

EDIT: Fixed

Would you post the exact line 45 please

@CodeNoob its

if blocksx[i] ~= nil then

I think problem is not on line 45, most probabily at the end of the if blockā€¦
End enp