Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The error you've shown seems to be related to the getItem() method you're trying to call on the target object. However, in your code, you're checking if target or target:getItem() is nil before calling this method. This means that the error shouldn't occur at this point.
Since the error mentioned line 29 of your cask_and_kegs.lua file, I suggest you review that specific line to ensure you're not trying to call getItem() incorrectly or from an incorrect object.
If line 29 is where getItem() is called, there might be an issue with how the target object is being obtained or passed. Make sure target is a valid object that has the getItem() method defined. Additionally, verify that target is not nil before attempting to call its getItem() method.
[error] Lua Script Error Detected
Interface: Scripts Interface
Script ID: /data/scripts/actions/objects/cask_and_kegs.lua:callback Error Description: .../data/scripts/actions/objects/cask_and_kegs.lua:29: attempt to call method 'getItem' (a nil value) stack traceback:
[C]: in function 'getItem'
.../data/scripts/actions/objects/cask_and_kegs.lua:29: in function <.../data/scripts/actions/objects/cask_and_kegs.lua:28>
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Behaviour
Actual
Do this and that doesn't happens
Expected
Do this and that happens
Fixes #issuenumber
Type of change
Please delete options that are not relevant.
How Has This Been Tested
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist