Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daily reward is not working #369

Closed
2 of 4 tasks
lucasgrizante opened this issue May 1, 2022 · 1 comment · Fixed by #371
Closed
2 of 4 tasks

Daily reward is not working #369

lucasgrizante opened this issue May 1, 2022 · 1 comment · Fixed by #371
Labels
Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@lucasgrizante
Copy link
Contributor

lucasgrizante commented May 1, 2022

Priority

Low

Area

  • Datapack
  • Source
  • Map
  • Other

What happened?

When I click in the reward shrine, this error shows up:

May 01 18:01:20 instance-20220216-1801 canary[3160296]: scriptInterface: [Scripts Interface]
May 01 18:01:20 instance-20220216-1801 canary[3160296]: scriptId: [/home/otsmanager/canary/data/scripts/daily_reward/daily_reward_shrine.lua:callback]
May 01 18:01:20 instance-20220216-1801 canary[3160296]: timerEvent: []
May 01 18:01:20 instance-20220216-1801 canary[3160296]:  callbackId:[]
May 01 18:01:20 instance-20220216-1801 canary[3160296]: function: []
May 01 18:01:20 instance-20220216-1801 canary[3160296]: error [data/modules/scripts/daily_reward/daily_reward.lua:603: attempt to call method 'addItemId' (a nil value)
May 01 18:01:20 instance-20220216-1801 canary[3160296]: stack traceback:
May 01 18:01:20 instance-20220216-1801 canary[3160296]:         [C]: in function 'addItemId'
May 01 18:01:20 instance-20220216-1801 canary[3160296]:         data/modules/scripts/daily_reward/daily_reward.lua:603: in function 'readDailyReward'
May 01 18:01:20 instance-20220216-1801 canary[3160296]:         data/modules/scripts/daily_reward/daily_reward.lua:634: in function 'sendDailyReward'
May 01 18:01:20 instance-20220216-1801 canary[3160296]:         data/modules/scripts/daily_reward/daily_reward.lua:248: in function 'loadDailyReward'
May 01 18:01:20 instance-20220216-1801 canary[3160296]:         ...canary/data/scripts/daily_reward/daily_reward_shrine.lua:4: in function <...canary/data/scripts/daily_reward/daily_reward_shrine.lua:3>]

the line with the error is this:

				local itemId = rewards[i]
				local itemType = ItemType(itemId)
				local itemName = itemType:getArticle() .. " " .. itemType:getName()
				local itemWeight = itemType:getWeight()
				msg:addItemId(itemId) -- this line is causing the error, and it used to work before.
				msg:addString(itemName)
				msg:addU32(itemWeight)
			end```

### What OS are you seeing the problem on?

Linux

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@lucasgrizante lucasgrizante added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label May 1, 2022
@github-actions github-actions bot added Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing labels May 1, 2022
@lucasgrizante
Copy link
Contributor Author

In otservbr-global, It was changed in this commit

opentibiabr/otservbr-global@2d59b5e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant