• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Script] Battle frontier scripting help

  • 15
    Posts
    4
    Years
    • Seen Nov 11, 2020
    I'm trying to enter this code for a battle facility but it says that its missing #define

    Code:
    setflag FLAG_BATTLE_FACILITY
    setvar VAR_BATTLE_FACILITY_POKE_NUM 4
    setvar VAR_BATTLE_FACILITY_POKE_LEVEL 50
    setvar VAR_BATTLE_FACILITY_BATTLE_TYPE 0

    I'm using CFRU
     
    Are you using XSE to write this? If yes, then you need to make some small changes because XSE doesn't know what "FLAG_BATTLE_FACILITY", "VAR_BATTLE_FACILITY_POKE_NUM", etc are. So, you have to make XSE identify these using '#define'.

    Try using one of these two solutions:
    Solution 1: Put these lines on the top of your script below #dynamic 0xOffset and before any main script begins.
    #define FLAG_BATTLE_FACILITY 0x930
    #define VAR_BATTLE_FACILITY_POKE_NUM 0x5015
    #define VAR_BATTLE_FACILITY_POKE_LEVEL 0x5016
    #define VAR_BATTLE_FACILITY_BATTLE_TYPE 0x5017
    Make sure to change the underlined parts to the variables that you used in CFRU's config.h for the Battle Tower Options.

    Solution 2: Replace the parts in your post with these lines:
    setflag 0x930
    setvar 0x5015 4
    setvar 0x5016 50
    setvar 0x5017 0
    Once again, make sure to change the underlined parts with the variables from config.h

    If you are using PKSV, the solution should be same. Although, I have never used it before.
     
    Back
    Top