The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Give item command problem (https://www.pokecommunity.com/showthread.php?t=392336)

ASDBUDDY May 9th, 2017 12:49 PM

Give item command problem
 
Hi so, whilst making this script i got an error when I tried compiling it
on line 18 aka giveitem command and the problem is occuring in MSG_OBTAIN as when I replace it with 0x1 it compiles fine, but i guess 0x1 is for item found not obtained. Any thoughts of what I might be doing wrong?

Code:
Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x202
if 0x1 goto @done
checkflag 0x4B0
if 0x1 goto @bestow
msgbox @tl 0x6
release
end

#org @tl
= [blue_fr] I want to bestow my mighty rod!\p But there is no one worthy!

#org @bestow
msgbox @bb 0x6
giveitem 0x107 0x1 MSG_OBTAIN
setflag 0x202
release
end

#org @done
msgbox @done2 0x6
release
end

#org @done2
= [blue_fr] There are no Pokémon in this Pond.\pBut there are still\n many places to fish!

#org @bb
= [blue_fr] Oh! The BoulderBadge!\pFinally someone worthy of this rod!\n Here take it, it is yours now.

Christos May 11th, 2017 6:19 AM

0x0 is for obtained. To use MSG_OBTAIN instead you need to add '#include std.rbh' at the start of your script.

ASDBUDDY May 11th, 2017 6:25 AM

Quote:

Originally Posted by Christos (Post 9643810)
0x0 is for obtained. To use MSG_OBTAIN instead you need to add '#include std.rbh' at the start of your script.

Ok Thanks Chris.


All times are GMT -8. The time now is 9:14 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.