Jump to content

Bird mod not working, everything seems fine in log.tex


MF99K

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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"),
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...