Advertiser Content

[TUTORIAL] Decomp - From start to finish Page 2

Started by TheRisingSean December 1st, 2019 3:49 PM
  • 3861 views
  • 34 replies
Seen 1 Week Ago
Posted 1 Week Ago
2 posts
69 Days
Hi, i do everything till step 9, which give this error, ill try to do the others without this and give some other errors. +
other thing the git software dont do the compiled process whit de Lunos tutorial.
Spoiler:

Auto-merging src/pokemon.c
Auto-merging src/party_menu.c
Auto-merging src/item_use.c
Auto-merging src/data/pokemon/item_effects.h
Auto-merging src/battle_pyramid.c
Auto-merging src/battle_main.c
Auto-merging include/item_use.h
Auto-merging include/graphics.h
Auto-merging include/constants/pokemon.h
Auto-merging include/constants/item_effects.h
Auto-merging data/scripts/item_ball_scripts.inc
CONFLICT (content): Merge conflict in data/scripts/item_ball_scripts.inc
Automatic merge failed; fix conflicts and then commit the result.
Male
Mt. Silver
Seen 1 Day Ago
Posted 1 Day Ago
105 posts
10.4 Years
Hi, TheRisingSean. It seems you had pictures in your tutorial, but they are not visible anymore (at least for me). Any chance you could reupload those images? Thanks a lot!

DizzyEgg

Age 22
Male
Poland
Seen 1 Day Ago
Posted 4 Days Ago
793 posts
6 Years
Hi, i do everything till step 9, which give this error, ill try to do the others without this and give some other errors. +
other thing the git software dont do the compiled process whit de Lunos tutorial.
Spoiler:

CONFLICT (content): Merge conflict in data/scripts/item_ball_scripts.inc
Automatic merge failed; fix conflicts and then commit the result.
Hey, that was because I had not merged the latest pokeemerald commits. I just updated all my three repos and you should be able to merge all my stuff without any problems.
Male
Mt. Silver
Seen 1 Day Ago
Posted 1 Day Ago
105 posts
10.4 Years
I think I managed to succesfully merge the three branches. However, when compiling the ROM (running 'make' in MSYS2) I get the following errors.

What's important to note is that I succesfully compiled a ROM yesterday before installing the branches. Then today I started working on these expansions and apparently something went wrong somewhere.

Spoiler:
[email protected] MSYS /c/pokeemerald
$ make -j2
In file included from src/pokemon.c:40:
include/constants/abilities.h:260: warning: "ABILITIES_COUNT_GEN7" redefined
  260 | #define ABILITIES_COUNT_GEN7 234
      |
include/constants/abilities.h:257: note: this is the location of the previous definition
  257 | #define ABILITIES_COUNT_GEN7 235
      |
In file included from src/battle_main.c:52:
include/constants/abilities.h:260: warning: "ABILITIES_COUNT_GEN7" redefined
  260 | #define ABILITIES_COUNT_GEN7 234
      |
include/constants/abilities.h:257: note: this is the location of the previous definition
  257 | #define ABILITIES_COUNT_GEN7 235
      |
In file included from src/pokemon.c:1400:
src/data/pokemon/level_up_learnsets.h:2: warning: "LEVEL_UP_END" redefined
    2 | #define LEVEL_UP_END (0xffff)
      |
In file included from include/pokemon.h:4,
                 from include/global.h:520,
                 from src/pokemon.c:1:
include/constants/pokemon.h:230: note: this is the location of the previous definition
  230 | #define LEVEL_UP_END       0xFFFF
      |
In file included from src/pokemon.c:40:
include/constants/abilities.h:254: syntax error before `<'
include/constants/abilities.h:261: missing white space after number `62755e250124'
src/pokemon.c:57: syntax error before `}'
In file included from src/battle_main.c:52:
include/constants/abilities.h:254: syntax error before `<'
include/constants/abilities.h:261: missing white space after number `62755e250124'
agbcc: warnings being treated as errors
In file included from src/battle_main.c:404:
src/data/text/abilities.h:461: warning: excess elements in array initializer after `gAbilityNames'
src/data/text/abilities.h:700: warning: excess elements in array initializer after `gAbilityDescriptionPointers'
make: *** [Makefile:249: build/emerald/src/battle_main.o] Fout 1 // Translation: "Error 1"
make: *** Wachten op onvoltooide taken... // Translation: "Waiting for incompleted tasks"
In file included from src/pokemon.c:1402:
src/data/pokemon/level_up_learnset_pointers.h:823: `sMeltanLevelUpLearnset' undeclared here (not in a function)
src/data/pokemon/level_up_learnset_pointers.h:823: initializer element for `gLevelUpLearnsets[808]' is not constant
src/data/pokemon/level_up_learnset_pointers.h:824: `sMelmetalLevelUpLearnset' undeclared here (not in a function)
src/data/pokemon/level_up_learnset_pointers.h:824: initializer element for `gLevelUpLearnsets[809]' is not constant
src/pokemon.c:2335: elements of array `sAlteringCaveWildMonHeldItems' have incomplete type
agbcc: warnings being treated as errors
src/pokemon.c:2337: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[0]'
src/pokemon.c:2337: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[0]'
src/pokemon.c:2338: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[1]'
src/pokemon.c:2338: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[1]'
src/pokemon.c:2339: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[2]'
src/pokemon.c:2339: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[2]'
src/pokemon.c:2340: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[3]'
src/pokemon.c:2340: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[3]'
src/pokemon.c:2341: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[4]'
src/pokemon.c:2341: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[4]'
src/pokemon.c:2342: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[5]'
src/pokemon.c:2342: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[5]'
src/pokemon.c:2343: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[6]'
src/pokemon.c:2343: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[6]'
src/pokemon.c:2344: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[7]'
src/pokemon.c:2344: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[7]'
src/pokemon.c:2345: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[8]'
src/pokemon.c:2345: warning: excess elements in struct initializer after `sAlteringCaveWildMonHeldItems[8]'
src/pokemon.c:2346: invalid use of undefined type `struct SpeciesItem'
src/pokemon.c: In function `GetWildMonTableIdInAlteringCave':
src/pokemon.c:6567: sizeof applied to an incomplete type
src/pokemon.c:6567: invalid use of undefined type `struct SpeciesItem'
src/pokemon.c:6568: invalid use of undefined type `struct SpeciesItem'
src/pokemon.c: In function `SetWildMonHeldItem':
src/pokemon.c:6603: invalid use of undefined type `struct SpeciesItem'
make: *** [Makefile:249: build/emerald/src/pokemon.o] Fout 1 // Translation: "Error 1"

As far as I can understand, most errors are in src/pokemon.c. I'm snipping the lines 2335-2346 below:
Spoiler:
static const struct SpeciesItem sAlteringCaveWildMonHeldItems[] =
{
    {SPECIES_NONE,      ITEM_NONE},
    {SPECIES_MAREEP,    ITEM_GANLON_BERRY},
    {SPECIES_PINECO,    ITEM_APICOT_BERRY},
    {SPECIES_HOUNDOUR,  ITEM_BIG_MUSHROOM},
    {SPECIES_TEDDIURSA, ITEM_PETAYA_BERRY},
    {SPECIES_AIPOM,     ITEM_BERRY_JUICE},
    {SPECIES_SHUCKLE,   ITEM_BERRY_JUICE},
    {SPECIES_STANTLER,  ITEM_PETAYA_BERRY},
    {SPECIES_SMEARGLE,  ITEM_SALAC_BERRY},
};

Does anyone have an idea what caused this and how to fix this?

mgriffin

Online now
Posted 3 Hours Ago
964 posts
5.8 Years
Does anyone have an idea what caused this and how to fix this?
Not sure specifically, but I feel like you might have made a mistake merging some of the files.
In file included from src/pokemon.c:40:
include/constants/abilities.h:260: warning: "ABILITIES_COUNT_GEN7" redefined
  260 | #define ABILITIES_COUNT_GEN7 234
      |
include/constants/abilities.h:257: note: this is the location of the previous definition
  257 | #define ABILITIES_COUNT_GEN7 235
This error (and the ones like it) are saying that you've defined ABILITIES_COUNT_GEN7 twice (in include/constants/abilities.h). And you've got two different definitions too, which is doubly-weird.

EDIT: The other error about "struct SpeciesItem" appears to be happening because there isn't a definition of SpeciesItem in scope. Probably a missing #include at the top of pokemon.c. You could try searching to see if a file defines "struct SpeciesItem { ... };" (stuff will be in that ... bit).
Male
Mt. Silver
Seen 1 Day Ago
Posted 1 Day Ago
105 posts
10.4 Years
Not sure specifically, but I feel like you might have made a mistake merging some of the files.
In file included from src/pokemon.c:40:
include/constants/abilities.h:260: warning: "ABILITIES_COUNT_GEN7" redefined
  260 | #define ABILITIES_COUNT_GEN7 234
      |
include/constants/abilities.h:257: note: this is the location of the previous definition
  257 | #define ABILITIES_COUNT_GEN7 235
This error (and the ones like it) are saying that you've defined ABILITIES_COUNT_GEN7 twice (in include/constants/abilities.h). And you've got two different definitions too, which is doubly-weird.

EDIT: The other error about "struct SpeciesItem" appears to be happening because there isn't a definition of SpeciesItem in scope. Probably a missing #include at the top of pokemon.c. You could try searching to see if a file defines "struct SpeciesItem { ... };" (stuff will be in that ... bit).
Thanks for the quick response. I think I managed to fix it somehow: Looking into the files mentioned indeed revealed some clear merge conflicts or data missing. The ROM is now compiling, I'll update his post once it's completed.

I most definitely messed up with merging. I am pretty clueless when it comes to Git and Github, I admit, and have had to redo it several times, and probably something went wrong there. Perhaps I should start again from scratch for good measure, although for now it seems to work...

For the record, here's what I did:
  • There was a merge conflict in abilities.h and I had to remove the line that said "#define ABILITIES_COUNT_GEN7 234". This resolved that specific error, and for some reason also the ones referring to Altering Cave and "struct SpeciesItem"...
  • When trying again to compile, this was the output at that point:
  • [email protected] MSYS /c/pokeemerald
    $ make -j2
    In file included from src/pokemon.c:1400:
    src/data/pokemon/level_up_learnsets.h:2: warning: "LEVEL_UP_END" redefined
        2 | #define LEVEL_UP_END (0xffff)
          |
    In file included from include/pokemon.h:4,
                     from include/global.h:520,
                     from src/pokemon.c:1:
    include/constants/pokemon.h:230: note: this is the location of the previous definition
      230 | #define LEVEL_UP_END       0xFFFF
          |
    arm-none-eabi-as -mcpu=arm7tdmi --defsym MODERN=0 -o build/emerald/src/battle_main.o build/emerald/src/battle_main.s
    arm-none-eabi-as -mcpu=arm7tdmi --defsym MODERN=0 -o build/emerald/src/title_screen.o build/emerald/src/title_screen.s
    In file included from src/pokemon.c:1402:
    src/data/pokemon/level_up_learnset_pointers.h:823: `sMeltanLevelUpLearnset' undeclared here (not in a function)
    src/data/pokemon/level_up_learnset_pointers.h:823: initializer element for `gLevelUpLearnsets[808]' is not constant
    src/data/pokemon/level_up_learnset_pointers.h:824: `sMelmetalLevelUpLearnset' undeclared here (not in a function)
    src/data/pokemon/level_up_learnset_pointers.h:824: initializer element for `gLevelUpLearnsets[809]' is not constant
    make: *** [Makefile:249: build/emerald/src/pokemon.o] Fout 1
    make: *** Wachten op onvoltooide taken...
    arm-none-eabi-as -mcpu=arm7tdmi --defsym MODERN=0 -o build/emerald/src/contest_effect.o build/emerald/src/contest_effect.s
  • Still not great, but much better. In level_up_learnset_pointers.h, it turned out that movesets for Meltan and Melmetal were missing. I manually copied and inserted the dummy movesets for these two Pokemon from DizzyEgg's repo.
  • Line 2 of level_up_learnset_pointers.h says "#define LEVEL_UP_END (0xffff)" but it should be "#define LEVEL_UP_END 0xFFFF" I believe. At least this is also how it is on DizzyEgg's repo, so I changed that too.

Fixing these things seems to have resolved these errors. The ROM is now being compiled. We'll see if it runs.

Interestingly enough, the error about "struct SpeciesItem" disappeared after tinkering with abilities.h. So I didn't do anything with that.

Update: The compilation has completed and the ROM works. I haven't tried out battle and Pokémon functionalities yet, but I am assuming there are no major problems.
Age 19
Male
Argentina
Seen 1 Week Ago
Posted 1 Week Ago
1 posts
24 Days
in step 9 i typed "git pull EGG item expansion" and i got this message

Merge branch 'item_expansion' of ht tps://github.com/dizzyeggg/pokeemerald
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.


what should i do?

mgriffin

Online now
Posted 3 Hours Ago
964 posts
5.8 Years
@Bottenham you can just accept that default message and let the merge finish. Not a Windows user, but I imagine it's as simple as closing the text editor that opened up with that message in it (note: not the command prompt itself). Possible options for that are Ctrl-X (nano), :wq (vim), or… I forget what Emacs uses.
.
Advertiser Content