{"action":"opened","issue":{"url":"https://api.github.com/repos/mc-server/MCServer/issues/2111","labels_url":"https://api.github.com/repos/mc-server/MCServer/issues/2111/labels{/name}","comments_url":"https://api.github.com/repos/mc-server/MCServer/issues/2111/comments","events_url":"https://api.github.com/repos/mc-server/MCServer/issues/2111/events","html_url":"https://github.com/mc-server/MCServer/issues/2111","id":79822324,"number":2111,"title":"Error trying to drop item","user":{"login":"PIC-27","id":6631828,"avatar_url":"https://avatars.githubusercontent.com/u/6631828?v=3","gravatar_id":"","url":"https://api.github.com/users/PIC-27","html_url":"https://github.com/PIC-27","followers_url":"https://api.github.com/users/PIC-27/followers","following_url":"https://api.github.com/users/PIC-27/following{/other_user}","gists_url":"https://api.github.com/users/PIC-27/gists{/gist_id}","starred_url":"https://api.github.com/users/PIC-27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PIC-27/subscriptions","organizations_url":"https://api.github.com/users/PIC-27/orgs","repos_url":"https://api.github.com/users/PIC-27/repos","events_url":"https://api.github.com/users/PIC-27/events{/privacy}","received_events_url":"https://api.github.com/users/PIC-27/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-23T11:38:47Z","updated_at":"2015-05-23T11:38:47Z","closed_at":null,"body":"I'm trying to break a block and drop it as item but doesn't work\r\nThe function `destroyBlock` is called when a player break a block with the hook : `HOOK_PLAYER_BROKEN_BLOCK`\r\n```lua\r\nfunction destroyBlock(bx, by, bz)\r\n\tupperID = WORLD:GetBlock(bx, by, bz)\r\n\tif upperID == 17 or upperID == 162 then\r\n\t\tWORLD:DigBlock(bx, by, bz)\r\n\t\tlocal drop = cItems():Add(upperID, 1, 0)\r\n\r\n\t\tWORLD:SpawnItemPickups(drop, bx, by, bz, 0)\r\n\tend\r\nend\r\n```\r\n\r\nIt tells me ` argument #2 is 'nil'; 'value' expected.` in function `SpawnItemPickups`"}}