Error while compiling: Quests.cs(422,31): 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?
Error while compiling Quests.cs after today's update
Same error needs to be updated for the new wipe
Search for OnItemCraftFinished and replace it like this:
void OnItemCraftFinished(ItemCraftTask task, Item item, ItemCrafter itemCrafter)
{
var player = itemCrafter.owner;
if (player != null)
if (hasQuests(player.userID) && isQuestItem(player.userID, item.info.shortname, QuestType.Craft))
ProcessProgress(player, QuestType.Craft, item.info.shortname, item.amount);
} MONaH
Search for OnItemCraftFinished and replace it like this:
void OnItemCraftFinished(ItemCraftTask task, Item item, ItemCrafter itemCrafter) { var player = itemCrafter.owner; if (player != null) if (hasQuests(player.userID) && isQuestItem(player.userID, item.info.shortname, QuestType.Craft)) ProcessProgress(player, QuestType.Craft, item.info.shortname, item.amount); }
Thank you!
that works !Thank you very much
Thanks, but got these ErrorΒ
Failed to call hook 'OnItemCraftFinished' on plugin 'Quests v2.4.3' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.Quests.OnItemCraftFinished (ItemCraftTask task, Item item, ItemCrafter itemCrafter) [0x00000] in <481e2085d78447bcbbfc70b716c719ec>:0
at Oxide.Plugins.Quests.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00635] in <481e2085d78447bcbbfc70b716c719ec>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <23ba99f131254889867c71f0bd137b1d>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <157a94ee66ab4a7991faecd1eb84be3b>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String @cryptextitan you replaced it wrong
MONaH
Search for OnItemCraftFinished and replace it like this:
void OnItemCraftFinished(ItemCraftTask task, Item item, ItemCrafter itemCrafter) { var player = itemCrafter.owner; if (player != null) if (hasQuests(player.userID) && isQuestItem(player.userID, item.info.shortname, QuestType.Craft)) ProcessProgress(player, QuestType.Craft, item.info.shortname, item.amount); }
Β
Thank you working now
How i didnt see it? @MONaH@cryptextitan I don't see your image π
ok maybe you find my mistake https://pastebin.com/gCBu6TPf
@cryptextitan, maybe you have modified version or something. Try to download latest version and replace block I posted above and see if that helps.
@MONaH i tried, but the same error.