Recluse420 Posted November 27, 2016 Share Posted November 27, 2016 Hi there, I was just wondering if was vet. would be able to help me figure out what is going on with my mod. Here is a screenshot of the error message, and the code. Quote local MakePlayerCharacter = require "prefabs/player_common" local assets = { Asset( "ANIM", "anim/player_basic.zip" ), Asset( "ANIM", "anim/player_idles_shiver.zip" ), Asset( "ANIM", "anim/player_actions.zip" ), Asset( "ANIM", "anim/player_actions_axe.zip" ), Asset( "ANIM", "anim/player_actions_pickaxe.zip" ), Asset( "ANIM", "anim/player_actions_shovel.zip" ), Asset( "ANIM", "anim/player_actions_blowdart.zip" ), Asset( "ANIM", "anim/player_actions_eat.zip" ), Asset( "ANIM", "anim/player_actions_item.zip" ), Asset( "ANIM", "anim/player_actions_uniqueitem.zip" ), Asset( "ANIM", "anim/player_actions_bugnet.zip" ), Asset( "ANIM", "anim/player_actions_fishing.zip" ), Asset( "ANIM", "anim/player_actions_boomerang.zip" ), Asset( "ANIM", "anim/player_bush_hat.zip" ), Asset( "ANIM", "anim/player_attacks.zip" ), Asset( "ANIM", "anim/player_idles.zip" ), Asset( "ANIM", "anim/player_rebirth.zip" ), Asset( "ANIM", "anim/player_jump.zip" ), Asset( "ANIM", "anim/player_amulet_resurrect.zip" ), Asset( "ANIM", "anim/player_teleport.zip" ), Asset( "ANIM", "anim/wilson_fx.zip" ), Asset( "ANIM", "anim/player_one_man_band.zip" ), Asset( "ANIM", "anim/shadow_hands.zip" ), Asset( "SOUND", "sound/sfx.fsb" ), Asset( "SOUND", "sound/wilson.fsb" ), Asset( "ANIM", "anim/harmin.zip" ), Asset( "ANIM", "anim/harmin_beard.zip" ), } local prefabs = { "beardhair", } local start_inv = { -- Custom starting items "piggyback", "axe", "pickaxe", } local fn = function OnResetBeard(inst) inst.AnimState:ClearOverrideSymbol("beard") end --tune the beard economy... local BEARD_DAYS = { 1, 2, 3 } local BEARD_BITS = { 1, 3, 9 } local fn = function OnGrowShortBeard(inst) inst.AnimState:OverrideSymbol("beard", "harmin_beard", "beard_short") inst.components.beard.bits = BEARD_BITS[1] end local fn = function OnGrowMediumBeard(inst) inst.AnimState:OverrideSymbol("beard", "harmin_beard", "beard_medium") inst.components.beard.bits = BEARD_BITS[2] end local fn = function OnGrowLongBeard(inst) inst.AnimState:OverrideSymbol("beard", "harmin_beard", "beard_long") inst.components.beard.bits = BEARD_BITS[3] end local fn = function(inst) inst:AddComponent("beard") inst.components.beard.onreset = OnResetBeard inst.components.beard.prize = "beardhair" inst.components.beard:AddCallback(BEARD_DAYS[1], OnGrowShortBeard) inst.components.beard:AddCallback(BEARD_DAYS[2], OnGrowMediumBeard) inst.components.beard:AddCallback(BEARD_DAYS[3], OnGrowLongBeard) -- choose which sounds this character will play inst.soundsname = "wilson" -- Minimap icon inst.MiniMapEntity:SetIcon( "wilson.tex" ) -- Stats inst.components.health:SetMaxHealth(200) inst.components.hunger:SetMax(150) inst.components.sanity:SetMax(350) -- Damage multiplier (optional) inst.components.combat.damagemultiplier = 3 -- Hunger rate (optional) inst.components.hunger.hungerrate = .20 * TUNING.WILSON_HUNGER_RATE -- Movement speed (optional) inst.components.locomotor.walkspeed = 7 inst.components.locomotor.runspeed = 10 end return MakePlayerCharacter("harmin", prefabs, assets, fn, start_inv) Link to comment Share on other sites More sharing options...
Recluse420 Posted November 27, 2016 Author Share Posted November 27, 2016 The character was working prior to decompiling and setting up a beard. Link to comment Share on other sites More sharing options...
Mobbstar Posted November 27, 2016 Share Posted November 27, 2016 Remove the "fn = " in the head of every function. local function OnResetBeard(inst) Link to comment Share on other sites More sharing options...
Recluse420 Posted November 27, 2016 Author Share Posted November 27, 2016 Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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.