You're missing the Message Type param. So, just change that line to either...
for the message "Player obtained Rare Candy."Code:giveitem 0x44 0x1 0x0
Or change it to...
for the message "Player found Rare Candy."Code:giveitem 0x44 0x1 0x1
K ty, The compile was successful though in game the message box doesn't come and the player freezes
EDIT:We have to put the XXXXXX in #Dynamic 0xXXXXXX as the offset in Advance Map, right?