• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

trouble adding items

19
Posts
4
Years
This is just my second day toying around with pokeemerald. I was starting to feel a bit less lost but that turned on it's head when I got my first compile error: src/data/items.h:1: warning: array `gItems' assumed to have one element

as expected, the game refused to compile with one of the game data containers next to empty (I think it would only have it's null value in this case but idk). I added 14 items to items.h (both the one that initializes the items and the one that stores the names), and I made sure to adjust the items count at the end to 391(it was 377 beforehand). I filled in all the data in the other items.h file for the new items like they were meant for the items pocket using the items listed for that pocket as examples. I think I understand all the components of that struct except for secondaryID and type. the numbers assigned to them seem to be almost always 0 and 4 constantly, but I don't know why or what it means for them to differ. so that's one thing that could have broken it.

the only other thing I can think of that could have broken it is that I added an item_ball script so I could test one of the items and just used an arbitrary number for the number next to the name of the script. I tried to make it unique, and checked it against all the other scripts in that folder and it cleared. but I don't know the theory behind those numbers. I assume that they are pointer addresses?? in which case do I just use trial and error until I find an unoccupied address? or is there a better way?

any help here would be wonderful, I haven't touched pokecommunity in forever. didn't even know I had an account. so please tell me of any mistakes I make formatting or etiquette wise.

(I don't think this relevant, but I'm trying add hold items that make the game think that the Pokemon holding them has the item's assigned field move. pretty sure I got the implementation for that good, but that's in party_menu.c; I don't think the interferes, but I could be wrong.)
 
19
Posts
4
Years
Nevermind, didn't notice that the errors list the file path and line number where the error occurred. I was able to get it to build. seems the game doesn't like it when you put too many characters or an underscore in an item's displayed name.
 
Back
Top