- 132
- Posts
- 10
- Years
- New Brunswick
- Seen May 6, 2023
Sorry, I couldn't find anything previously posted on the matter. Anyway, really quick:
I make an item quest like so.
What I'm going for: The event checks if you have 5 potions. If you have 5 potions, it'll take them and reward you, etc. If not, blah. So anyway...
What I get:
The only possible offender of this crash must be "$PokemonBag.pbQuantity(:POTION)==5," as it's the only script in the entire event.
This is the script copied directly from the "Manipulation items" tutorial:
$PokemonBag.pbQuantity(:POTION)==5
As compared to mine:
$PokemonBag.pbQuantity(:POTION)==5
So am I missing a step or something? The tutorial (here) mentions something about comparing the script with "$PokemonBag.pbQuantity(:POTION)," but I'm not exactly sure what it means by "compare" and how I'd go about "comparing" the two scripts. Thank you. Almost done with this demo, dangit :)
I make an item quest like so.
Spoiler:
Conditional Branch: Script: $PokemonBag.pbQuantity(:POTION)==5
What I'm going for: The event checks if you have 5 potions. If you have 5 potions, it'll take them and reward you, etc. If not, blah. So anyway...
What I get:
Spoiler:
Exception: RuntimeError
Message: Script error within event 3, map 81 (ACE HQ):
Exception: TypeError
Message: Section147:382:in `[]'Symbol as array index
***Full script:
$PokemonBag.pbQuantity(:POTION)==5
Interpreter:243:in `pbExecuteScript'
Compiler:382:in `[]'
PokemonItems:26:in `pbGetPocket'
PokemonBag:419:in `pbQuantity'
(eval):1:in `pbExecuteScript'
Interpreter:788:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:788:in `command_111'
Interpreter:320:in `execute_command'
Interpreter:193:in `update'
Interpreter:276:in `pbExecuteScript'
Interpreter:788:in `command_111'
Interpreter:320:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
Message: Script error within event 3, map 81 (ACE HQ):
Exception: TypeError
Message: Section147:382:in `[]'Symbol as array index
***Full script:
$PokemonBag.pbQuantity(:POTION)==5
Interpreter:243:in `pbExecuteScript'
Compiler:382:in `[]'
PokemonItems:26:in `pbGetPocket'
PokemonBag:419:in `pbQuantity'
(eval):1:in `pbExecuteScript'
Interpreter:788:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:788:in `command_111'
Interpreter:320:in `execute_command'
Interpreter:193:in `update'
Interpreter:276:in `pbExecuteScript'
Interpreter:788:in `command_111'
Interpreter:320:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
The only possible offender of this crash must be "$PokemonBag.pbQuantity(:POTION)==5," as it's the only script in the entire event.
This is the script copied directly from the "Manipulation items" tutorial:
$PokemonBag.pbQuantity(:POTION)==5
As compared to mine:
$PokemonBag.pbQuantity(:POTION)==5
So am I missing a step or something? The tutorial (here) mentions something about comparing the script with "$PokemonBag.pbQuantity(:POTION)," but I'm not exactly sure what it means by "compare" and how I'd go about "comparing" the two scripts. Thank you. Almost done with this demo, dangit :)