Jump to content

Error after update 03. August

Closed 1.6.9 1.7.5

ilineus
ilineus

Posted

I get this error after todays update: 

Error while compiling: LSkins.cs(1295,22): error CS1061: Type `ItemCraftTask' does not contain a definition for `owner' and no extension method `owner' of type `ItemCraftTask' could be found. Are you missing an assembly reference? 

Bones64Z

Posted

Me too

162 LSkins - Failed to compile: LSkins.cs(1295,22): error CS1061: Type `ItemCraftTask' does not contain a definition for `owner' and no extension method `owner' of type `ItemCraftTask' could be found. Are you missing an assembly reference?

pcbnbsfsd

Posted

  113 LSkins - Failed to compile: LSkins.cs(1295,22): error CS1061: Type `ItemCraftTask' does not contain a definition for `owner' and no extension method `owner' of type `ItemCraftTask' could be found. Are you missing an assembly reference?

 

Yes NotsoMomma Got it too.. Waves to everyone up above. 

mrdecoder

Posted

im sure he will, ill try to make a temp fix for it 

 

  • Love 1
ilineus

Posted

That would be awesome! Our players would love you for that ^^

  • Like 1
Roger93

Posted

I am trying to solve it if I get the solution I will post it here Let's see who patch it first

  • Haha 1
mrdecoder

Posted

replace whole OnItemCraftFinished with 
 

private void OnItemCraftFinished(ItemCraftTask task, Item item, ItemCrafter itemCrafter)
        {
			if (!itemCrafter)
                return;
            
            BasePlayer player = itemCrafter.owner; 
			
            string shortname = item.info.shortname;
            if (item.info.shortname.Contains("hazmatsuit"))
                shortname = "hazmatsuit";
            if(task.skinID != 0 && !cfg.SkinAuto) return;
            if(task.skinID != 0 && cfg.blackList.Contains(ulong.Parse(task.skinID.ToString()))) return;
            if (!permission.UserHasPermission(player.UserIDString, cfg.canusedefault)) return;
            DataPlayer playerData;
            if(!this.playerData.TryGetValue(player.userID, out playerData)) return;
            DefaultSkins skinData;
            if(!playerData._defaultSkins.TryGetValue(shortname, out skinData)) return;
            if(item.skin == skinData.skinId ) return;
            if (shortname.Contains("hazmatsuit"))
            {
                if(item.info.shortname == _hazmats[skinData.skinId]) return;
                var pos = item.position;
                var uids = item.uid;
                var amount = item.amount;
                item.DoRemove();
                item = ItemManager.CreateByName($"{_hazmats[skinData.skinId]}");
                item.uid = uids;
                item.amount = amount;
                player.GiveItem(item);
                item.MarkDirty();
                return;
            }
            item.skin = skinData.skinId;
            var held = item.GetHeldEntity();
            if (held == null) return;
            held.skinID = skinData.skinId;
            held.SendNetworkUpdate();
        }

 

  • Love 1
ilineus

Posted

OMFG! Thank you so much! Your are the best!

LAGZYA

Posted

Changed Status from Pending to Closed

Changed Fixed In to 1.7.5

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.4k

Files Sold

Total number of files sold.

2.1m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.