- 34
- Posts
- 5
- Years
- Seen Sep 20, 2024
Hey peeps,
I'm creating an item that turns on a switch when you use it, and off when you use it again. It functions fine! Until I add in the pbMessage function. Currently the script looks like this:
And it is without fail the second pbMessage that throws up an error. If I remove that one, it functions fine. Does anyone have the expertise to point out the fault here? I'm tearing my hair out!
Cheers in advance!
I'm creating an item that turns on a switch when you use it, and off when you use it again. It functions fine! Until I add in the pbMessage function. Currently the script looks like this:
Code:
ItemHandlers::UseInField.add(:ULTRAMAXREPEL,proc { |item|
if $game_switches[225]==true
$game_switches[225] = false
pbMessage(_INTL("The powerful Repel dissapates... Wild Pokemon have returned!"))
next 1
end
if $game_switches[225]==false
$game_switches[225] = true
pbMessage(_INTL("The powerful Repel wafts around... Wild Pokemon have fled!")
next 1
end
})
And it is without fail the second pbMessage that throws up an error. If I remove that one, it functions fine. Does anyone have the expertise to point out the fault here? I'm tearing my hair out!
Cheers in advance!