Hi, I’m creating a firefighter script, but I came across a problem. He gives me this error:
Error creating script environment for resource pompier: Object reference not set to an instance of an object
But I do not understand why, here is the script, it’s server side:
local time = 10
local Mission = math.random(1,1)
MissionInfo = {}
function MissionID()
Mission = math.random(1,1)
end
function MissionInfo()
if Mission == 1 then
MissionInfo["title"] = 'Incendie'
MissionInfo["x"] = 264.297
MissionInfo["y"] = 5830.75
MissionInfo["z"] = 408.064
end
end
function RequestNewMission()
while (time ~= 0) do
Wait( 1000 )
time = time - 1
end
MissionID()
MissionInfo()
end
RequestNewMission()
If someone could help me and explain my error please
Best regards,
KonScyence