CloudSixteen / Clockwork

A roleplaying framework developed by Cloud Sixteen for the people.
http://CloudSixteen.com
MIT License
44 stars 44 forks source link

Crafting System Error #434

Closed xTheCatalyst closed 5 years ago

xTheCatalyst commented 5 years ago

[ERROR] gamemodes/clockwork/framework/libraries/sh_crafting.lua:408: attempt to concatenate a nil value

  1. FormatRequirements - gamemodes/clockwork/framework/libraries/sh_crafting.lua:408
    1. GetMarkupToolTip - gamemodes/clockwork/framework/libraries/sh_crafting.lua:639
    2. unknown - gamemodes/clockwork/framework/derma/cl_crafting.lua:161

The above code is spammed in my console when I open the crafting menu in game. My one blueprint shows up, but when hovering over it or trying to craft it (I have added both necessary ingredients to my schema as working, collectible script items) I'm spammed every single frame with that error in the console and cannot craft the blueprint.

I am running the most recent version of non-beta Clockwork (0.96.3) and HL2RP (1.08).

Here is the code for the blueprint, in case that's what is causing it:

--[[ This blueprint was constructed using http://www.ClockworkConstructors.com, a free and easy to use web application to make your own Clockwork items, factions, plugins, and more! Brought to you by http://www.JonathanDroogh.com, aka RJ. --]]

local BLUEPRINT = Clockwork.crafting:New();

BLUEPRINT.name = "Cook Small Meat"; BLUEPRINT.description = "Cooks a small amount of meat."; BLUEPRINT.model = "models/foodnhouseholditems/steak2.mdl"; BLUEPRINT.category = "Food";

BLUEPRINT.itemRequirements = { ["fuelwood"] = 1, ["rawsmallmeat"] = 1 };

BLUEPRINT.takeItems = { ["fuelwood"] = 1 };

BLUEPRINT.giveItems = { ["cookedsmallmeat"] = 1 };

-- Called just before crafting. function BLUEPRINT:OnCraft(player) end;

-- Called just after crafting. function BLUEPRINT:PostCraft(player) end;

-- Called when crafting is unsuccessful. function BLUEPRINT:FailedCraft(player) end;

BLUEPRINT:Register();

kiobu commented 5 years ago

Download Clockwork from the master branch of this repository and try again. 0.96.3 had issues with crafting that were fixed with pull requests such as #422 that were not pushed to the releases on GitHub or the store.

EDIT: Be sure to download through the Clone or Download button rather than the releases page.

xTheCatalyst commented 5 years ago

crafterror [ERROR] gamemodes/clockwork/framework/libraries/sh_crafting.lua:417: attempt to concatenate a nil value

  1. FormatRequirements - gamemodes/clockwork/framework/libraries/sh_crafting.lua:417
    1. GetMarkupToolTip - gamemodes/clockwork/framework/libraries/sh_crafting.lua:649
    2. unknown - gamemodes/clockwork/framework/derma/cl_crafting.lua:162

Just updated to that version; issue remains the same. It's shooting me the same code as before, with the lines being a little different.

xTheCatalyst commented 5 years ago

With that error, would it be hard to determine if what it's calling is being overwritten? Is there an easy way to find out what could be overwriting it?

minikanyas commented 5 years ago

It seems that CheckFormatRequirements is returning nil. Could you send the itemRequirements items lua files?

xTheCatalyst commented 5 years ago

shid.zip

minikanyas commented 5 years ago

As I thought your items are missing the uniqueID property and you're using the wrong ones there. You may want to add that property (ITEM.uniqueID) or correct the itemRequirements uniqueID's. (I recommend the first option)

xTheCatalyst commented 5 years ago

You beautiful man, that fixed it. Thank you. I'll not come back to the github with such dumbassery again if I can help it.

xRJx commented 5 years ago

I'll be marking this Issue as Solved. A user (murray-elijah) pointed out a lot of Issues that are solved or expired, so I'm working on that to tidy up Clockwork's Issues.