• ✨ ARCHIVE MODE ✨
    The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
    We recommend you join our Discord server to get real-time response: Discord Invite Link

Fixed [Indev 0.46] Crash upon Challenging a Trainer Who Says Your or Your Rival's Name

flyBEET

Starting Trainer
wow...so many words from so many poeple's " that most of it i believe non bug related"..........,anyways, back to the subject
i read somewhere in the comments the guys having this problem "i'm one of them btw" are stuck in the game and can't advance in it, however i found this glitch in a way that i've already found out how to bypass it,
what you should do is >>>> "FLY" to "Victory road" and the game will place you at the door next to the glitched Trainer, so you don't have to actually battle that trainer.

Hope that helps you with your problem.
cheers.
Yeah, I figured that out. But then, right after that, when you actually get to the end of Victory Road, the game crashes right before the required rival battle. There is no way to bypass this.
 

flyBEET

Starting Trainer
i'm stuck in azalea town, but while I wait I train my team ;)
Yeah, I would do that, but I don't want to weaken my pokemon before the rival battle, nor do I feel like leaving Victory Road. So usually, I just do battlespot.
 

Fanta

Content Developer
P3D Developer
Global Moderator
Yeah, I would do that, but I don't want to weaken my pokemon before the rival battle, nor do I feel like leaving Victory Road. So usually, I just do battlespot.
You can use an escape rope to leave victory road and when you want to go back to the rival ( when it is fixed ) just use a repel to get there without weakening your pokemons.
 

Def Jam

Starting Trainer
Here's my 2 cents on the issue. I'm in Azalea town right after beating Bugsy, who I had no problem battling on version 0.46, but once I reach the rival battle to leave the town the game crashes.
Code:
Code:
Game information:

Pokémon 3D Indev version: 0.46
Content Packs: {}
Active GameMode: Pokemon 3D
GameJolt Account: FALSE
Playing on Servers: FALSE
Game Environment: OverworldScreen
Actionscript: Type: Script; Input: rival\rival_azalea\startscript; Line: 25
File Validation: True

---------------------------------------------------------------------------------

System specifications:

Operating system: Microsoft Windows 7 Home Premium  [6.1.7601.65536]
System time: 3/21/2014 3:26:07 PM
System language: English (United States)(ENU) / Loaded game language: en
Decimal separator: .

---------------------------------------------------------------------------------

Graphics Card information:

[CardName(s): "Intel(R) HD Graphics 4000"]
[CardRAM(s) : "2214592512"]

---------------------------------------------------------------------------------

Error information:

Message: StartIndex cannot be less than zero.
Parameter name: startIndex
InnerException: NOTHING
BaseException: StartIndex cannot be less than zero.
Parameter name: startIndex
HelpLink: No helplink available.
Data: Items: 0
Source: mscorlib

---------------------------------------------------------------------------------

Error solution:
(The provided solution might not work for your problem)

Error ID: -1
Error Type: NaN
Error Description: The error is undocumented in the error handling system.
Error Solution: NaN

---------------------------------------------------------------------------------

CallStack:

   at System.String.Remove(Int32 startIndex)
   at _2._5DHero.ScriptComparer.GetArgumentValue(Object inputString)
   at _2._5DHero.ScriptCommander.Parse(String input)
   at _2._5DHero.Trainer.LoadTrainerNew(String[] Data)
   at _2._5DHero.Trainer..ctor(String TrainerFile)
   at _2._5DHero.ScriptCommander.DoBattle(String subClass)
   at _2._5DHero.ScriptCommander.InizializeCommand(ScriptV2& ScriptV2, String inputString)
   at _2._5DHero.ScriptV2.DoCommand()
   at _2._5DHero.ScriptV2.Update()
   at _2._5DHero.Script.Update()
   at _2._5DHero.ActionScript.Update()
   at _2._5DHero.OverworldScreen.Update()
   at _2._5DHero.Basic.Update(GameTime gameTime)
   at _2._5DHero.DGame.Update(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
   at Microsoft.Xna.Framework.GameHost.OnIdle()
   at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
   at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
   at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Microsoft.Xna.Framework.WindowsGameHost.Run()
   at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
   at Microsoft.Xna.Framework.Game.Run()
   at _2._5DHero.Program.Main(String[] args)
 

Gothmog

Pokémon Ranger
Here's my 2 cents on the issue. I'm in Azalea town right after beating Bugsy, who I had no problem battling on version 0.46, but once I reach the rival battle to leave the town the game crashes.
Code:
Code:
Game information:

Pokémon 3D Indev version: 0.46
Content Packs: {}
Active GameMode: Pokemon 3D
GameJolt Account: FALSE
Playing on Servers: FALSE
Game Environment: OverworldScreen
Actionscript: Type: Script; Input: rival\rival_azalea\startscript; Line: 25
File Validation: True

---------------------------------------------------------------------------------

System specifications:

Operating system: Microsoft Windows 7 Home Premium  [6.1.7601.65536]
System time: 3/21/2014 3:26:07 PM
System language: English (United States)(ENU) / Loaded game language: en
Decimal separator: .

---------------------------------------------------------------------------------

Graphics Card information:

[CardName(s): "Intel(R) HD Graphics 4000"]
[CardRAM(s) : "2214592512"]

---------------------------------------------------------------------------------

Error information:

Message: StartIndex cannot be less than zero.
Parameter name: startIndex
InnerException: NOTHING
BaseException: StartIndex cannot be less than zero.
Parameter name: startIndex
HelpLink: No helplink available.
Data: Items: 0
Source: mscorlib

---------------------------------------------------------------------------------

Error solution:
(The provided solution might not work for your problem)

Error ID: -1
Error Type: NaN
Error Description: The error is undocumented in the error handling system.
Error Solution: NaN

---------------------------------------------------------------------------------

CallStack:

   at System.String.Remove(Int32 startIndex)
   at _2._5DHero.ScriptComparer.GetArgumentValue(Object inputString)
   at _2._5DHero.ScriptCommander.Parse(String input)
   at _2._5DHero.Trainer.LoadTrainerNew(String[] Data)
   at _2._5DHero.Trainer..ctor(String TrainerFile)
   at _2._5DHero.ScriptCommander.DoBattle(String subClass)
   at _2._5DHero.ScriptCommander.InizializeCommand(ScriptV2& ScriptV2, String inputString)
   at _2._5DHero.ScriptV2.DoCommand()
   at _2._5DHero.ScriptV2.Update()
   at _2._5DHero.Script.Update()
   at _2._5DHero.ActionScript.Update()
   at _2._5DHero.OverworldScreen.Update()
   at _2._5DHero.Basic.Update(GameTime gameTime)
   at _2._5DHero.DGame.Update(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
   at Microsoft.Xna.Framework.GameHost.OnIdle()
   at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
   at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
   at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Microsoft.Xna.Framework.WindowsGameHost.Run()
   at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
   at Microsoft.Xna.Framework.Game.Run()
   at _2._5DHero.Program.Main(String[] args)
known issue...for a while now...
just wait for an update to fix it.
 

Adrinus

Trainer
Hey, I think I found the Solution:
In the startscript.dat for rival/rival_azalea The battle is being called like this:

Code:
:if:<register.registered(starter1)>=true
        :then
            @battle.trainer(rival\rival_1_fire)
        :endif
       
        :if:<register.registered(starter2)>=true
        :then
            @battle.trainer(rival\rival_1_water)
        :endif

        :if:<register.registered(starter3)>=true
        :then
            @battle.trainer(rival\rival_1_grass)
        :endif
But in the other instances it's called like so:


Code:
:if:<register.registered(starter1)>=true
    @npc.register(elmlab.dat|2|remove|1)
    @battle.trainer(rival_0_fire)
:endif

:if:<register.registered(starter2)>=true
    @npc.register(elmlab.dat|3|remove|1)
    @battle.trainer(rival_0_water)
:endif

:if:<register.registered(starter3)>=true
    @npc.register(elmlab.dat|1|remove|1)
    @battle.trainer(rival_0_grass)
:endif
My bet is on not needing the extra "rival/" before the number and type.
 

Fanta

Content Developer
P3D Developer
Global Moderator
the thing is......every rival battle is bugged in this game, not just azelea, although i think i have seen some people beating the rival just before they name him "as in the First time you encounter him"
 

Adrinus

Trainer
the thing is......every rival battle is bugged in this game, not just azelea, although i think i have seen some people beating the rival just before they name him "as in the First time you encounter him"
That would follow with my suggestion, since the only one that works is the one without a "rival/" (the first encounter) same issue for Victory Road I've just checked.

Edit: Upon further inspection, the error seems to occur on that line of code too. (depending on your starter)
 
Last edited:

Fanta

Content Developer
P3D Developer
Global Moderator
well....either way, the problem is said to be fixed, just waiting for it to get deployed in the next update whenever that comes
 

MrHippocrit

Champion
Trusted Support
Retired Mod
The cause of this bug is a script incompatibility.
All scripts have this ''Version=2'' above it, indicating the script version.
Which means, only version 2 scripts work. They were converting version=1 scripts to version=2 scripts, but overlooked a script command which evidently is causing the crash.
 

Adrinus

Trainer
The cause of this bug is a script incompatibility.
All scripts have this ''Version=2'' above it, indicating the script version.
Which means, only version 2 scripts work. They were converting version=1 scripts to version=2 scripts, but overlooked a script command which evidently is causing the crash.
Interesting... I may have to look through all the code, it's quite nicely formatted, though I can believe the inconsistencies since after only a few minutes poking around I've seen the same functions written out 2-3 different ways.
 

Darkfire

Administrator
Administrator
P3D Developer
So the issue was that we upgraded the battle files to allow version=2 constructs to work
By doing so we made version 1 constructs(<rivalname>, <playername>, etc) crash the game
These were used most often in event battles(Rival battles, Gym Leaders, E4, Rocket, Etc) and every rival battle EXCEPT the first one uses the <rivalname> construct so that causes alot of issues.....

To answer any questions about the battle calls:
The reason only the first file doesnt have "rival\" in it is because it is the only trainer file not in the rival subfolder of the trainer folder
if you goto /Pokemon/Scripts/Trainer/Rival you will see all of the files except the ones for the first battle
This is because if we move the trainer battle files we change the register related to them since it is based on the file location so when nilllzz started he was just putting every trainer file in the main trainer folder instead of sorting them and didnt start sorting them until about Union Cave I believe......
 
Top