Lord Niggle Posted May 13, 2018 Share Posted May 13, 2018 I am attempting to make a small personal mod that refuels the lazy explorer by 25% with orange gems. Here's the code for it GLOBAL.FUELTYPE.ORANGEM = "ORANGEM" AddPrefabPostInit("orangestaff", function(inst) inst:DoTaskInTime(0, function() if inst.components.fueled then inst.components.fueled.fueltype = GLOBAL.FUELTYPE.ORANGEM inst.components.fueled.accepting = true end end) end) AddPrefabPostInit("orangegem", function(inst) if inst.components.fuel == nil then inst:AddComponent("fuel") end if inst.components.fuel then inst.components.fuel.fuelvalue = GLOBAL.TUNING.ORANGESTAFF_FUEL * 1/4 inst.components.fuel.fueltype = GLOBAL.FUELTYPE.ORANGEM end end) however, upon picking up an orange gem i get the crash message I'm assuming is below the text any help at all i greatly appreciate as the no-refueling of the staff greatly annoys me =) Link to comment Share on other sites More sharing options...
RedHairedHero Posted May 17, 2018 Share Posted May 17, 2018 I believe your issue is this line GLOBAL.TUNING.ORANGESTAFF_FUEL The error is basically saying that this isn't a number and can't perform arithmetic because of that. You'll need to assign a value to ORANGESTAFF_FUEL before you can call it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now