Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-28-2006, 11:12 AM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Bomypet problem.

PHP Code:
temp.cmds 1;
temp.cmda this.( "load_" slotindex 2).tokenize"->")[ 0];
temp.cmdb this.( "load_" slotindex 2).tokenize"->")[ bindex];
temp.cmdc = { temp.cmdatemp.cmdb};
temp.cmdt = { "event""action"}; 
for ( 
02++) {
  if ( 
temp.cmdct].length() > 0) {
    if ( 
temp.cmdct].pos"(") = - 1
      
this.( "c" temp.cmdtt]) = requestCommandIndextemp.cmdct]);
    else {
      
this.( "c" temp.cmdtt]) = requestCommandIndextemp.cmdct].substring0temp.cmdct].pos"(")));
      if ( 
this.draw_iconsthis.caction][ 6] == 2) {
        
temp.cmdm "";
        
temp.cmds this.draw_iconsthis.caction][ 8].indextemp.cmdct].substringtemp.cmdct].pos"(") + 1temp.cmdct].pos")") - temp.cmdct].pos"(") - 1));
        
temp.cmdb "dropdown";
        echo(
"Debug (t - temp.cmds): " " - " temp.cmds);
      }
      else {
        
temp.cmdm temp.cmdct].substringtemp.cmdct].pos"(") + 1temp.cmdct].pos")") - temp.cmdct].pos"(") - 1);
        
temp.cmdb temp.cmdtt].substring01).upper() @ temp.cmdtt].substring1).lower();
      }
      
initTextboxtemp.cmdbtemp.cmds); 
      if ( 
temp.cmdm != "")
        ( 
temp.cmdb "_Param").text temp.cmdm;
      
this.( temp.cmdtt].substring01) @ "textbox") = 1;
    }
  }

Rc keeps giving an error that a loop limit has been exceeded, anyone knows why? I mean.. it only makes a loop till 2.. so it shouldn't do anything wrong.
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #2  
Old 08-28-2006, 05:21 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
The only time I recived that error, was when I accidentily had two loops using the same var. Example:

PHP Code:
for (0whatever++) {
  for (
0whatever2++) {
  }

__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #3  
Old 08-28-2006, 05:21 PM
_Z3phyr_ _Z3phyr_ is offline
Banned
Join Date: Sep 2003
Location: Louisiane
Posts: 390
_Z3phyr_ is an unknown quantity at this point
for ( t = 0; t <= 2; t ++) {
^that will make it loop to 2. *shrug*

I don't know about any loop limit or whatever so someone else can post about it.


EDIT - to below poster:
Really? I always believed that < makes it stop at the number below the number because if its ==2 then its not less than, and if it was <= it would stop at the number given because it would still be true.

I don't know though so whever works. My mistake.
Reply With Quote
  #4  
Old 08-28-2006, 05:22 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by _Z3phyr_
for ( t = 0; t <= 2; t ++) {
that will make it loop until 2.

I don't know about any loop limit or whatever so someone else can post about it.
No, that will make it loop to 3, use '<' instead of '<='.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #5  
Old 08-28-2006, 06:26 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by contiga
Rc keeps giving an error that a loop limit has been exceeded, anyone knows why? I mean.. it only makes a loop till 2.. so it shouldn't do anything wrong.
The error in RC should give you a line at which the script is exceeding the limit.
Give us that block of code.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #6  
Old 08-28-2006, 07:43 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by _Z3phyr_
for ( t = 0; t <= 2; t ++) {
^that will make it loop to 2. *shrug*

I don't know about any loop limit or whatever so someone else can post about it.


EDIT - to below poster:
Really? I always believed that < makes it stop at the number below the number because if its ==2 then its not less than, and if it was <= it would stop at the number given because it would still be true.

I don't know though so whever works. My mistake.
<= will make the var increase for the final time when the var is #, < will make the var increase at the value before #.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #7  
Old 08-28-2006, 07:49 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by xXziroXx
No, that will make it loop to 3, use '<' instead of '<='.
Wrong.
PHP Code:
for ( 02++) 
Will make i = 0 and i = 1.
PHP Code:
<= 2
Would add i = 2 also.


Quote:
Originally Posted by Tolnaftate2004
The error in RC should give you a line at which the script is exceeding the limit.
Give us that block of code.
Quote:
Originally Posted by GraalScript
Loop limit exceeded in script of bomyisland_bomy_idle (in level kontest.nw at pos (6, 39))
That's all it says.

Maybe Stefan or a GST that knows what's wrong can take a look? GServer: dev (Graal2001 Dev), Class: con_bomypet & con_bomycontrol.

It only happens in combination with a gui popup ctrl, not with getting text from gui text ctrl.
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #8  
Old 08-29-2006, 11:17 AM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Please help me quick.. we need the bomypet finished!
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #9  
Old 08-29-2006, 09:00 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Lol, Ziro was right, I had 2 times the same var used for a loop in a loop..

The function : initTextBox( foo); had a loop in it also, with a var named "t".

How such dumb things can keep you busy!
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #10  
Old 08-29-2006, 09:10 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by contiga
Lol, Ziro was right, I had 2 times the same var used for a loop in a loop..

The function : initTextBox( foo); had a loop in it also, with a var named "t".

How such dumb things can keep you busy!
Mhm, I didnt notice it for hours either.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.