Jump to content

Recommended Posts

8 minutes ago, Hornete said:

Oh, i'm a moron, I accidentally spelled _SpawnedHauntedBeast instead of _SpawnHuntedBeast


local alternate_beasts = UpvalueHacker.GetUpvalue(_SpawnedHauntedBeast, "_alternate_beasts")

Just correct the typo and it'll work haha.

you wrote UpvalueHacker.SetUpValue did you mean UpvalueHacker.GetUpValue?

3 minutes ago, Hornete said:

Ha, Yeah I meant SetUpvalue, without the capitlized V, thanks for catching that.

Ok well now it's crashing with

[00:00:25]: [string "../mods/mymod/scripts/tools/upvaluehacker...."]:16: invalid value (table) at index 2 in table for 'concat'

i'm getting confused so bad

  • Like 1
7 minutes ago, Well-met said:

Ok well now it's crashing with


[00:00:25]: [string "../mods/mymod/scripts/tools/upvaluehacker...."]:16: invalid value (table) at index 2 in table for 'concat'

i'm getting confused so bad

...Another typo again haha.

UpvalueHacker.SetUpvalue(_SpawnHuntedBeast, "_alternate_beasts", alternate_beasts)

should be

UpvalueHacker.SetUpvalue(_SpawnedHuntedBeast, "_alternate_beasts", alternate_beasts)

super sorry lol

5 minutes ago, Hornete said:

...Another typo again haha.


UpvalueHacker.SetUpvalue(_SpawnHuntedBeast, "_alternate_beasts", alternate_beasts)

should be


UpvalueHacker.SetUpvalue(_SpawnedHuntedBeast, "_alternate_beasts", alternate_beasts)

super sorry lol

[00:00:25]: [string "../mods/mymod/scripts/tools/upvaluehacker...."]:16: invalid value (table) at index 2 in table for 'concat'

Same crash. Looks like it's a problem with the upvaluehacker.lua I grabbed from earlier?

  • Like 1
8 minutes ago, Well-met said:

[00:00:25]: [string "../mods/mymod/scripts/tools/upvaluehacker...."]:16: invalid value (table) at index 2 in table for 'concat'

Same crash. Looks like it's a problem with the upvaluehacker.lua I grabbed from earlier?

local UpvalueHacker = require("tools/upvaluehacker")

AddComponentPostInit("hunter", function(self)
	local _SpawnHuntedBeast = UpvalueHacker.GetUpvalue(self.OnDirtInvestigated, "SpawnHuntedBeast")
	local alternate_beasts = UpvalueHacker.GetUpvalue(_SpawnHuntedBeast, "_alternate_beasts")

	table.insert(alternate_beasts, "claywarg")
	table.insert(alternate_beasts, "gingerbreadwarg")
	table.insert(alternate_beasts, "mermking")
	table.insert(alternate_beasts, "lordfruitfly")

	UpvalueHacker.SetUpvalue(_SpawnHuntedBeast, alternate_beasts, "_alternate_beasts")
end)

okay this'll work for real this time I promise(I tested), I messed up the order of the last line there.

  • Potato Cup 2

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...