webgovernor
Member
Hi All,
I know I ask a lot of questions, but I attempt to answer as many as I can as well.
Anyway, I have an event, that reads like this
Now, the method it's calling is this:
When I run the event, I get an infinite loop, it's actually calling the above method an infinite amount of times, I've tested it with "p" commands.
Also, it doesn't go anywhere else. Just to that method, and the event isn't looping because I have a "Show Text" in there that only displays once.
So, the problem is SOLVED however, if the event reads like this:
The ONLY thing that changes between test runs is the BLANK line before the method call in the script.
It runs perfectly if that line is there, and it loops infinitaly if it's not there.
I tried several searches, hoping that RMXP just loops script if it's only one line, but I could find nothing.
So, would anyone care to help me out on this issue?
Thanks in advance,
-Webgovernor
Edit: I've noticed that dissabling different windows, including Enterbrain's windows, causes the loop to eventually break. This is extremely odd behavior.
I know I ask a lot of questions, but I attempt to answer as many as I can as well.
Anyway, I have an event, that reads like this
Code:
Control Self Switch: A = On
Script: set_quest_completed(1)
Now, the method it's calling is this:
PHP:
def set_quest_completed(qid)
if $quest[qid] # quest already taken
$power += 20
else # quest not taken
$qid = qid
end
Audio.me_play("Audio/ME/Quest_Complete.mid", 100, 100)
$quest[qid].failed = false
$quest[qid].completed = true
$quest[qid].active = false
end
When I run the event, I get an infinite loop, it's actually calling the above method an infinite amount of times, I've tested it with "p" commands.
Also, it doesn't go anywhere else. Just to that method, and the event isn't looping because I have a "Show Text" in there that only displays once.
So, the problem is SOLVED however, if the event reads like this:
Code:
Control Self Switch: A = On
Script:
:set_quest_completed(1)
The ONLY thing that changes between test runs is the BLANK line before the method call in the script.
It runs perfectly if that line is there, and it loops infinitaly if it's not there.
I tried several searches, hoping that RMXP just loops script if it's only one line, but I could find nothing.
So, would anyone care to help me out on this issue?
Thanks in advance,
-Webgovernor
Edit: I've noticed that dissabling different windows, including Enterbrain's windows, causes the loop to eventually break. This is extremely odd behavior.