Closed 423956 closed 8 years ago
To get help with scripting, post on the help section of the forum.
The tickets are strictly use to report bugs that come from the bot and can be explicitly reproduced.
Have tryed editing scripts multiple times, using scripts other people say work, etc.
Tryed reinstalling proshine/netframework/rebooting pc Tryed using a outdated version of PROshine nothing is fixing it
This is not due to scripting.
Unless you know exactly what function of the API is returning a nil
reference when it should not, this does not concern the bot.
The thing is it's almost impossible for anyone to recreate other then me and the other users who suffer from this bug, as scripts that work PERFECTLY for everyone else, do not work for us.
E.g
name = "Mt Silver 1F"
author = "X0r9"
description = "Train and farm money at Mt Silver 1F"
function onPathAction()
if isPokemonUsable(1) then
if getMapName() == "Mt. Silver Pokecenter" then
moveToMap("Mt. Silver Exterior")
elseif getMapName() == "Mt. Silver Exterior" then
moveToMap("Mt. Silver 1F")
elseif getMapName() == "Mt. Silver 1F" then
moveToRectangle(46, 55, 53, 55)
end
else
if getMapName() == "Mt. Silver 1F" then
moveToMap("Mt. Silver Exterior")
elseif getMapName() == "Mt. Silver Exterior" then
moveToMap("Mt. Silver Pokecenter")
elseif getMapName() == "Mt. Silver Pokecenter" then
usePokecenter()
end
end
end
function onBattleAction()
if isWildBattle() and isOpponentShiny() then
if useItem("Ultra Ball") or useItem("Great Ball") or useItem("Pokeball") then
return
end
end
if getActivePokemonNumber() == 1 then
return attack() or sendUsablePokemon() or run()
else
return run() or attack() or sendUsablePokemon()
end
end
This script was working fine for me 3 days ago, and now i cannot run it.
Reading the related post on the forum. This would be a bug with isOpponentEffortValue()
.
I need to know what pokemon you were fighting when it happened and where it happened.
I was in azaleia forest and it happend on 100% of pokemon.
Also, It is not the ev that does it.
The script i posted above does not request evs, it is a simple leveling script and when i run it i get this.
http://i.imgur.com/TghfYtD.png
It walks fine to the location, the second it is in battle same error.
Any script that i have that involves attack()
or sendUsablePokemon() will not work.
There is no bug from the API that cannot be reproduced. If something works for everyone but you, that means you did something different. Maybe your team is different, maybe something else, that's what we should determine.
Unless you used a different version of the bot 3 days ago, the bug already was there when you used the script before, maybe something was different with your character then, something that is related to this bug, once again, that's what I need to know to fix the bug, if there is one.
What version of PROShine are you using?
I believe i have worked out what is causing this, allow me two minutes for further testing.
I have worked out the issue, earlier i said machamp i meant slowbro, the slowbro i recently taught scald. When a pokemon has scald it will give this error.
After removing scald from slowbro it now runs smoothly. thanks for your time!
There is a misunderstanding there. When opening an issue you engage yourself in the resolution of a software bug.
If the bug is still there it needs to be identified and fix.
You may have find a workaround but the bug still exists and I have no idea why scald could create this kind of bug.
Your error is:
Object reference not set to an instance of an object.
Right?
Could you please replace the onBattleAction
by this and paste me the 20 last lines before it returns the previous message:
https://gist.github.com/g0ldPRO/09180f03701211ea9a7a35bf96e2df50
Alright, should i get scald tm and teach slowbro it again before doing this?
If it's necessary to reproduce the bug, then yes.
Okay one moment mate.
Now does not even leave the poke center.
[1:13:49 a.m.] Connecting to the server... [1:13:50 a.m.] Connected, authenticating... [1:13:53 a.m.] Authenticated successfully! [1:13:53 a.m.] System: Welcome to Pokemon Revolution Online. (Blue Server) [1:14:00 a.m.] Script "Mt Silver 1F" by "X0r9" successfully loaded [1:14:00 a.m.] Train and farm money at Mt Silver 1F [1:14:02 a.m.] Bot started [1:14:02 a.m.] Error during the script execution: Object reference not set to an instance of an object. [1:14:02 a.m.] Bot stopped
That cannot be related to the late change, since the onBattleAction()
has not been executed.
Can you past me the entire script you ran? (preferably using https://git.github.com )
What about the output of this one? https://gist.github.com/g0ldPRO/2a133ecb904affaf2557046f1439fb44
That returns the following;
1:23:43 a.m.] Connecting to the server... [1:23:44 a.m.] Connected, authenticating... [1:23:45 a.m.] Authenticated successfully! [1:23:45 a.m.] System: Welcome to Pokemon Revolution Online. (Blue Server) [1:23:49 a.m.] Script "Mt Silver 1F" by "X0r9" successfully loaded [1:23:49 a.m.] Train and farm money at Mt Silver 1F [1:23:50 a.m.] Bot started [1:23:50 a.m.] isPokemonUsable(1) [1:23:50 a.m.] Error during the script execution: Object reference not set to an instance of an object. [1:23:50 a.m.] Bot stopped
Can you try learning another attack instead of scald?
Alternatively, or if it does not work can you paste all the attacks of the first pokemon? Slowbro right?
I won't be there for one hour of so, I'll have a look at that issue later in the day.
Yeah i'll be on for 5 or 6 more hours or so. I'm happy to help in anyway i can, just let me know if you need me. Let me change scald and show you logs.
[1:29:38 a.m.] Bot started [1:29:38 a.m.] isPokemonUsable(1) [1:29:38 a.m.] true [1:29:45 a.m.] isPokemonUsable(1) [1:29:45 a.m.] true [1:29:55 a.m.] isPokemonUsable(1) [1:29:55 a.m.] true [1:29:59 a.m.] isPokemonUsable(1) [1:29:59 a.m.] true [1:30:01 a.m.] isPokemonUsable(1) [1:30:01 a.m.] true [1:30:01 a.m.] A Wild Quagsire Attacks! [1:30:07 a.m.] onBattleAction() [1:30:07 a.m.] isWildBattle() [1:30:07 a.m.] true [1:30:07 a.m.] isOpponentShiny() [1:30:07 a.m.] getActivePokemonNumber() [1:30:07 a.m.] 1 [1:30:07 a.m.] attack() [1:30:07 a.m.] true [1:30:07 a.m.] Slowbro Attacks Quagsire with Surf. [1:30:07 a.m.] Quagsire Attacks Slowbro with Earthquake. [1:30:07 a.m.] Slowbro restored HP using Leftovers! [1:30:11 a.m.] onBattleAction() [1:30:11 a.m.] isWildBattle() [1:30:11 a.m.] true [1:30:11 a.m.] isOpponentShiny() [1:30:11 a.m.] getActivePokemonNumber() [1:30:11 a.m.] 1 [1:30:11 a.m.] attack() [1:30:11 a.m.] true [1:30:13 a.m.] Slowbro Attacks Quagsire with Surf. [1:30:13 a.m.] Slowbro restored HP using Leftovers! [1:30:13 a.m.] Quagsire has fainted! [1:30:13 a.m.] Slowbro gained 39636 Exp. [1:30:13 a.m.] You found 418 Pokedollar(s). [1:30:13 a.m.] You have won the battle. [1:30:14 a.m.] isPokemonUsable(1) [1:30:14 a.m.] true [1:30:15 a.m.] isPokemonUsable(1) [1:30:15 a.m.] true [1:30:16 a.m.] isPokemonUsable(1) [1:30:16 a.m.] true [1:30:17 a.m.] isPokemonUsable(1) [1:30:17 a.m.] true [1:30:17 a.m.] isPokemonUsable(1) [1:30:17 a.m.] true [1:30:19 a.m.] isPokemonUsable(1) [1:30:19 a.m.] true [1:30:20 a.m.] isPokemonUsable(1) [1:30:20 a.m.] true [1:30:21 a.m.] A Wild Golbat Attacks! [1:30:27 a.m.] onBattleAction() [1:30:27 a.m.] isWildBattle() [1:30:27 a.m.] true [1:30:27 a.m.] isOpponentShiny() [1:30:27 a.m.] getActivePokemonNumber() [1:30:27 a.m.] 1 [1:30:27 a.m.] attack() [1:30:27 a.m.] true [1:30:28 a.m.] Golbat Attacks Slowbro with Venoshock. [1:30:28 a.m.] Slowbro Attacks Golbat with Psychic. [1:30:28 a.m.] It's Super Effective! [1:30:28 a.m.] Slowbro restored HP using Leftovers! [1:30:28 a.m.] Golbat has fainted! [1:30:28 a.m.] Slowbro gained 43194 Exp. [1:30:28 a.m.] Slowbro has grown to level 59. [1:30:28 a.m.] You found 252 Pokedollar(s).
scald move is missing from PROProtocol/moveManager.cs.
I guess it was added more recently and the array was not updated then.
@g0ldPRO Yes, you are right, I have added the move in #19 in order to prevent this issue to repeat again. I haven't tested it yet.
@423956 Let me know if it works.
Yes it is working fine now! Thanks guys
Seems to be fixed by #19, thanks!
Receiving the error " Object reference not set to an instance of an object." when the trainer encounters a Pokemon. is effecting 100% of all my scripts that involve attacking that previously worked.
Scripts that catch pokemon and run away from the rest are uneffected.