Page 1 of 1

Bug: Runtime Error

PostPosted: Tue Sep 28, 2010 3:47 pm
by Bee-Ant
Here's the code in the following error line:
Code: Select all
CatalogList[i]=(i<82)?i-2:82;

Re: Bug: Runtime Error

PostPosted: Tue Sep 28, 2010 11:07 pm
by DST
lol yes, that's exactly what happened to me with code fuzzy told me about, the whole (x<y)? thing.....

I blame fuzzy. Just...because.

Hear that fuzz!? You are the cause of all my problems in this life! :P

Re: Bug: Runtime Error

PostPosted: Wed Sep 29, 2010 12:25 am
by Bee-Ant
I thought it's same thing with % where we can't use the same operand inside the formula, so I changed it to
Code: Select all
ii=i;jj=i-2;
CatalogList[i]=(ii<82)?jj:85;

But didn't help at all...darn :x

DST wrote:lol yes, that's exactly what happened to me with code fuzzy told me about, the whole (x<y)? thing.....
I blame fuzzy. Just...because.
Hear that fuzz!? You are the cause of all my problems in this life! :P

That's true...in this case, he's a failed teacher :P

Re: Bug: Runtime Error

PostPosted: Wed Sep 29, 2010 1:32 am
by DST
Fuzzy has taught me more than you could know. He is the best teacher i've ever had.

Re: Bug: Runtime Error

PostPosted: Wed Sep 29, 2010 6:10 am
by Bee-Ant
He treated us differently it seems...
For me, he just suggested me better method to do things. He pushed me to think deeper and then finally I solved the problem myself...
As if he just pushed me to find my own way, lucky you Dee :|

Re: Bug: Runtime Error

PostPosted: Wed Sep 29, 2010 7:04 am
by Fuzzy
Code: Select all
CatalogList[i] = (i<82)?i-2:82;


is wrong

try

Code: Select all
CatalogList[i] = (i<82)?(i-2):82;


next time you LISTEN when I teach things. :P

Re: Bug: Runtime Error

PostPosted: Wed Sep 29, 2010 8:07 am
by Bee-Ant
Fuzzy wrote:
Code: Select all
CatalogList[i] = (i<82)?(i-2):82;

next time you LISTEN when I teach things. :P


Bee-Ant wrote:
Code: Select all
ii=i;jj=i-2;
CatalogList[i]=(ii<82)?jj:85;


See who's not listening here???
Both method should make the same sense...that's why they both didn't work :wink:

LISTEN CAREFULLY NOW,
Code: Select all
xxx = (i<82)?i-2:82;

Is NOT wrong

Here's the code that works
Code: Select all
ii=(i<82)?i-2:85;
CatalogList[i]=ii;


The main problem is, we can't put an array into the formula directly 8)

Re: Bug: Runtime Error

PostPosted: Wed Sep 29, 2010 8:12 am
by Fuzzy
Oh I see. That is strange isnt it?

I tested it with a regular int variable so GE never complained.