The problem is that the script refuses to work and refuses to read the needs of the prisoners.
The game throws at me this error.
Code: Select all
local prisoners = Object.GetNearbyObjects(this, "Prisoner", 10);
if prisoners~=nil then
for name,dist in pairs( prisoners ) do
if (name.Needs.Drugs~=nil or name.Needs.Alcohol~=nil) and name.Category~='DeathRow' then