Jump to content

Recommended Posts

now it seems that the computer is having trouble with the "newbirds.lua" file in prefabs. It expects the code "<eof> near "end" before the return section, but when I put this code in, it says that the <eof> shouldn't be there. How can I fix this?

For your second problem, you might have an 'end' too much or less.

 

For your first problem, it's almost impossible to know what the trouble is without looking at the code.

Though, when it crashes, it usually states on what file and line the problem is and what sort of problem it is. That should help with guiding you.

For your second problem, you might have an 'end' too much or less.

 

For your first problem, it's almost impossible to know what the trouble is without looking at the code.

Though, when it crashes, it usually states on what file and line the problem is and what sort of problem it is. That should help with guiding you.

 

I've compared my newbirds.lua with base game birds.lua and I fixed what I thought would be the eof problem but nothing changed in the crash log.

 

The eof problem is somewhere in here:

 

 

local birdspawner = TheWorld.components.birdspawner

        if birdspawner ~= nil then
            inst:ListenForEvent("onremove", birdspawner.StopTrackingFn)
            inst:ListenForEvent("enterlimbo", birdspawner.StopTrackingFn)
            -- inst:ListenForEvent("exitlimbo", birdspawner.StartTrackingFn)
            birdspawner:StartTracking(inst)
        end
 
        MakeFeedablePet(inst, TUNING.BIRD_PERISH_TIME, nil, OnDropped)
 
        return inst
    end
    
    return Prefab("forest/animals/"..name, fn, assets, prefabs)
end
 
return Prefab(name, feathername, "dontstarve/birds/takeoff_"..soundname, "dontstarve/birds/chirp_"..soundname)
end
 
return makebird("crow", "crow"),
  makebird("robin", "robin"),
  makebird("robin_winter", "junco"),
  makebird("magpie", "crow"),
  makebird("phoebe", "robin"),

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...