Forum

runaway loop...

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

runaway loop...

Postby hondobondo » Fri Oct 28, 2011 3:58 pm

which code is the problem? can anyone tell from this? it happens when i grab a powerup, but if i use a cheat, it doesn't happen until i access CycleWeaponCommand, but i've used the same code before, only with cosmetic changes...
PR_ExecuteProgram: runaway loop 4
PR_ExecuteProgram: runaway loop 3
PR_ExecuteProgram: runaway loop 2
PR_ExecuteProgram: runaway loop 1
IFNOT 25445(?] branch 49
weapons/wchange.qc : CycleWeaponCommand : statement 198
weapons/weapons.qc : ImpulseCommands : statement 103
weapons/weapons.qc : W_WeaponFrame : statement 3
client.qc : PlayerPostThink : statement 10
runaway loop error 5000000
Host_Error: Program error
hondobondo
 
Posts: 207
Joined: Tue Sep 26, 2006 2:48 am

Re: runaway loop...

Postby frag.machine » Fri Oct 28, 2011 10:30 pm

Hard to say with just the console error. I am assuming you're working on SDQ, right ? Looks like an infinite loop of some sort. Check all break conditions in your loops, one of them is never returning false.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Re: runaway loop...

Postby Cobalt » Sat Oct 29, 2011 3:00 am

Is the trace on / trace off debugger used much anymore? Would it help in a case like this? Have never tried using it myself......
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: runaway loop...

Postby r00k » Sat Oct 29, 2011 6:23 am

CycleWeaponCommand

double check the condition of the loop in there

that error listing is saying in PlayerPostThink it called W_WeaponFrame, which picked up an impulse then called ImpulseCommands which parses the impulse to call CycleWeaponCommand which got stuck in a loop.
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Re: runaway loop...

Postby hondobondo » Sat Oct 29, 2011 11:58 pm

r00k wrote:CycleWeaponCommand

double check the condition of the loop in there

that error listing is saying in PlayerPostThink it called W_WeaponFrame, which picked up an impulse then called ImpulseCommands which parses the impulse to call CycleWeaponCommand which got stuck in a loop.


exactly what i needed. THANKS
hondobondo
 
Posts: 207
Joined: Tue Sep 26, 2006 2:48 am



Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest