• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

How can I define the Fishing events to prevent reeling in the rod?

  • 58
    Posts
    13
    Years
    • Seen Oct 12, 2024
    Each time I try to instert NobodySociety's script to prevent reeling the rod while fishing in PokeEmerald, I get these;

    build/emerald/src/field_player_avatar.i:9506: error: invalid encoding in UTF-8 string
    src/field_player_avatar.c: In function `Fishing_ShowDots':
    src/field_player_avatar.c:1784: syntax error at end of input
    agbcc: warnings being treated as errors
    src/field_player_avatar.c:128: warning: `Fishing_CheckForBite' used but never defined
    src/field_player_avatar.c:129: warning: `Fishing_GotBite' used but never defined
    src/field_player_avatar.c:130: warning: `Fishing_WaitForA' used but never defined
    src/field_player_avatar.c:131: warning: `Fishing_CheckMoreDots' used but never defined
    src/field_player_avatar.c:132: warning: `Fishing_MonOnHook' used but never defined
    src/field_player_avatar.c:133: warning: `Fishing_StartEncounter' used but never defined
    src/field_player_avatar.c:134: warning: `Fishing_NotEvenNibble' used but never defined
    src/field_player_avatar.c:135: warning: `Fishing_GotAway' used but never defined
    src/field_player_avatar.c:136: warning: `Fishing_NoMon' used but never defined
    src/field_player_avatar.c:137: warning: `Fishing_PutRodAway' used but never defined
    src/field_player_avatar.c:138: warning: `Fishing_EndNoMon' used but never defined
    src/field_player_avatar.c:139: warning: `AlignFishingAnimationFrames' used but never defined
    make: *** [Makefile:256: build/emerald/src/field_player_avatar.o] Error 1

    I know I have to define the Fishing events, as the warnings says, but how? If the solution to this can be found, then maybe I could port it to PokeRuby... but I'm not too sure about it yet.
     
    Could you share the changes you've made as a commit on github, or at least upload the field_player_avatar.c file somewhere? All of those functions are defined at the top of the file, so I'd guess "build/emerald/src/field_player_avatar.i:9506: error: invalid encoding in UTF-8 string" is the issue here. Can't really tell with just the error message though!
     
    There you go. These are my files that I edited to prevent the rod from reeling. Seems there's something at line 1784 in the PokeEmerald one that is making everything undefined, according to one source.
     

    Attachments

    • (PokeEmerald)field_player_avatar.c
      66.5 KB · Views: 6
    • (PokeRuby)field_player_avatar.c
      53.4 KB · Views: 6
    There you go. These are my files that I edited to prevent the rod from reeling. Seems there's something at line 1784 in the PokeEmerald one that is making everything undefined, according to one source.
    Yep I think that could be your problem:

    [PokeCommunity.com] How can I define the Fishing events to prevent reeling in the rod?


    Opening that file in VS Code shows that the "·" char hasn't copied well from the browser to your code editor (which can happen with special characters sometimes), so the compiler is seeing that as rubbish instead of a string and refusing to build the ROM.
    Try replacing the const u8 dot[] = _("�"); line with the one from vanilla pokeemerald and see if you can build after that.
     
    Yep I think that could be your problem:

    [PokeCommunity.com] How can I define the Fishing events to prevent reeling in the rod?


    Opening that file in VS Code shows that the "·" char hasn't copied well from the browser to your code editor (which can happen with special characters sometimes), so the compiler is seeing that as rubbish instead of a string and refusing to build the ROM.
    Try replacing the const u8 dot[] = _("�"); line with the one from vanilla pokeemerald and see if you can build after that.


    EDIT - Successfuly ported it to PokeEmerald. But after fixing the error using VS Code, I now get this on PokeRuby...

    arm-none-eabi-cpp -iquote include -Werror -Wno-trigraphs -D RUBY -D REVISION=0 -D ENGLISH -D=DEBUG_FIX0 -D DEBUG=0 -D MODERN=0 -I tools/agbcc/include -nostdinc -undef src/field_player_avatar.c -o build/ruby/src/field_player_avatar.i
    tools/preproc/preproc.exe build/ruby/src/field_player_avatar.i charmap.txt | tools/agbcc/bin/agbcc.exe -mthumb-interwork -Wimplicit -Wparentheses -Wunused -Werror -O2 -fhex-asm -o build/ruby/src/field_player_avatar.s
    agbcc: warnings being treated as errors
    src/field_player_avatar.c: In function `Fishing5':
    src/field_player_avatar.c:1601: warning: implicit declaration of function `AddTextPrinterParameterized'
    make: *** [Makefile:207: build/ruby/src/field_player_avatar.o] Error 1
     
    Last edited:
    EDIT - Successfuly ported it to PokeEmerald. But after fixing the error using VS Code, I now get this on PokeRuby...

    arm-none-eabi-cpp -iquote include -Werror -Wno-trigraphs -D RUBY -D REVISION=0 -D ENGLISH -D=DEBUG_FIX0 -D DEBUG=0 -D MODERN=0 -I tools/agbcc/include -nostdinc -undef src/field_player_avatar.c -o build/ruby/src/field_player_avatar.i
    tools/preproc/preproc.exe build/ruby/src/field_player_avatar.i charmap.txt | tools/agbcc/bin/agbcc.exe -mthumb-interwork -Wimplicit -Wparentheses -Wunused -Werror -O2 -fhex-asm -o build/ruby/src/field_player_avatar.s
    agbcc: warnings being treated as errors
    src/field_player_avatar.c: In function `Fishing5':
    src/field_player_avatar.c:1601: warning: implicit declaration of function `AddTextPrinterParameterized'
    make: *** [Makefile:207: build/ruby/src/field_player_avatar.o] Error 1
    AddTextPrinterParameterized doesn't exist in Pokeruby.
    As you can see in the same file you presented, Fishing10 which seems to be the function of code that in Pokeemerald is labeled Fishing_MonOnHook makes use of a function called MenuPrintMessageDefaultCoords in order to print the string of text labeled gOtherText_PokeOnHook.

    Basically, you should replace the contents of your Line 1601 with MenuPrintMessageDefaultCoords(dot);, I believe.
     
    AddTextPrinterParameterized doesn't exist in Pokeruby.
    As you can see in the same file you presented, Fishing10 which seems to be the function of code that in Pokeemerald is labeled Fishing_MonOnHook makes use of a function called MenuPrintMessageDefaultCoords in order to print the string of text labeled gOtherText_PokeOnHook.

    Basically, you should replace the contents of your Line 1601 with MenuPrintMessageDefaultCoords(dot);, I believe.

    You guys rocks! It now perfectly works! :D The only thing is that you do not see the dots while fishing in PokeRuby with this script, but you'll never have to reel in, as the only messages you can get will be ''A Pokémon's on the hook!'' or ''Not even a nibble...''
     
    Back
    Top