pbUseMove Syntax Error

Colorfulwonders

Sawyer the Gaymer Girl
Member
Joined
Mar 24, 2018
Posts
10
Age
21

I didn't even touch this part of the script but it seems to be having problems anyway. I've tried fixing this in many ways but an error message still shows up! Thank you in advance for any help you can give <3
 

MGriffin

Trainer
Member
Joined
May 8, 2017
Posts
95
I don't think you want the && on line 60. The docs for alias aren't terribly illuminating, but they don't say you're allowed expressions (which is what "__clauses__pbUseMove && pbUseMove" is, because of the &&), so that means you're not allowed them.
 

Colorfulwonders

Sawyer the Gaymer Girl
Member
Joined
Mar 24, 2018
Posts
10
Age
21
I don't think you want the && on line 60. The docs for alias aren't terribly illuminating, but they don't say you're allowed expressions (which is what "__clauses__pbUseMove && pbUseMove" is, because of the &&), so that means you're not allowed them.


that only seems to have made it worse. i checked "PokeBattle_Battler" and i can't even find a place where i should or would define "pbUseMove"
 

MGriffin

Trainer
Member
Joined
May 8, 2017
Posts
95
that only seems to have made it worse. i checked "PokeBattle_Battler" and i can't even find a place where i should or would define "pbUseMove"

I assume the original pbUseMove comes from the PokeBattle_Battler script, and that PokeBattle_Clauses is using the alias like a back-up. It's strange to me that you're running into these problems, my unedited Essentials 17.2 looks like it has similar code. I can only guess that the class (i.e. PokeBattle_Battler) or method (i.e. pbUseMove) isn't defined at the time that the clauses script is loaded... Perhaps you've reordered the scripts so that PokeBattle_Clauses comes before PokeBattle_Battler? Or maybe you've made a change in the PokeBattle_Battler script that changes the name of the class or causes pbUseMove to not be defined?

EDIT: I tried searching for uses of __clauses__pbUseMove, and it seems that there aren't any! So the nuclear option could be to just delete that whole line (but I'd recommend that only as a last resort).
 

Colorfulwonders

Sawyer the Gaymer Girl
Member
Joined
Mar 24, 2018
Posts
10
Age
21
I assume the original pbUseMove comes from the PokeBattle_Battler script, and that PokeBattle_Clauses is using the alias like a back-up. It's strange to me that you're running into these problems, my unedited Essentials 17.2 looks like it has similar code. I can only guess that the class (i.e. PokeBattle_Battler) or method (i.e. pbUseMove) isn't defined at the time that the clauses script is loaded... Perhaps you've reordered the scripts so that PokeBattle_Clauses comes before PokeBattle_Battler? Or maybe you've made a change in the PokeBattle_Battler script that changes the name of the class or causes pbUseMove to not be defined?

EDIT: I tried searching for uses of __clauses__pbUseMove, and it seems that there aren't any! So the nuclear option could be to just delete that whole line (but I'd recommend that only as a last resort).

I think i might have fixed it? I tried to make a special version of moxie in pokebattle_battler and when I deleted it the error stopped coming up. I still don't know what I did wrong though, I've seen plenty of people make variations of moxie with no issues at all.------------------------wait nevermind theres another error thing
 
Top