The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Problems with giveitem? Missing #define.

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old June 28th, 2019 (9:49 PM).
ckalp67 ckalp67 is offline
 
Join Date: Jun 2019
Posts: 5
I'm having problems using the giveitem command in XSE. Whenever I use this command and try to compile the script XSE gives this error message:

Error 13 "Type mismatch" on line 6
Missing #define.

The rest of the script compiles fine without the giveitem line. The line I'm using is:

giveitem 0x169 0x1 MSG_OBTAIN

Any help would be appreciated!
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old June 29th, 2019 (3:49 AM).
Blackforest's Avatar
Blackforest Blackforest is offline
 
Join Date: Nov 2018
Location: Medan, Indonesia
Gender: Male
Posts: 90
More detail please, is it pick item script, or someone give you item script?
Here are example script from my memory so it might be wrong.

If it is just pick item then :
#dynamic 0x800000
#org @item
giveitem 0x169 0x1 MSG_FIND
end

If it is someone give you item then it will be more complex
#dynamic 0x800000
#org @item
lock
msgbox @Intro MSG_keepopen
closeonkeypress
additem 0x169 0x1
loadpointer 0x0 @obtainmessage
giveitem2 0x169 0x1 0x???
end

#org @Intro
= Oi, here item!

#org @obtainmessage
= [Player] obtained item.

Note : ??? is jinglesound, like obtain item sound or receiving gym badge sound. I don't remember the byte.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old June 29th, 2019 (8:38 PM).
ckalp67 ckalp67 is offline
 
Join Date: Jun 2019
Posts: 5
found the problem. contrary to the tutorials I watched, the third parameter for giveitem appears to take a hex number with 0x0 being the obtained message and 0x1 being the found message. thanks for the help though!
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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