Page 1 of 1

code problem

PostPosted: Mon Jun 04, 2007 9:17 pm
by DarkParadox
whats wrong with this code :?:

Code: Select all
if(belltxtnumb.textnumber==>200;
{
    SendActivationEvent("status");
}

PostPosted: Mon Jun 04, 2007 9:28 pm
by d-soldier
==

"==" is the IF statement for equals.
Shoudl be "=>" I would think... but what do i know..

Re: code problem

PostPosted: Mon Jun 04, 2007 9:37 pm
by Sgt. Sparky
diormeh wrote:whats wrong with this code :?:

Code: Select all
if(belltxtnumb.textnumber==>200;
{
    SendActivationEvent("status");
}

also it needs to be textNumber, not textnumber. :D

PostPosted: Mon Jun 04, 2007 9:43 pm
by DarkParadox
it says unknown type in binhconst still

PostPosted: Mon Jun 04, 2007 9:47 pm
by d-soldier
did you capitalize the "n" as "textNumber"?

PostPosted: Mon Jun 04, 2007 9:49 pm
by DarkParadox
yes

PostPosted: Mon Jun 04, 2007 9:55 pm
by d-soldier
ooohhh...

if(belltxtnumb.textnumber==>200;
{
SendActivationEvent("status");
}

missing a ")" in the top line..

PostPosted: Mon Jun 04, 2007 9:56 pm
by DarkParadox
i changed it although it still says it.

PostPosted: Mon Jun 04, 2007 9:57 pm
by d-soldier
changed it to what... post the updated code... could be misplaced.

PostPosted: Mon Jun 04, 2007 9:58 pm
by DarkParadox
if(belltxtnumb.textNumber==>200);
{
SendActivationEvent("status");
}

PostPosted: Mon Jun 04, 2007 10:05 pm
by d-soldier
I thought I told you to get rid of the "=="
use this example:

if(text_lives.textNumber>0)
{
text_lives.textNumber -= 1;
CreateTimer("Event Actor", "1second", 1000);
}

PostPosted: Mon Jun 04, 2007 10:06 pm
by DarkParadox
ooohhh :oops:

PostPosted: Mon Jun 04, 2007 11:57 pm
by d-soldier
I know, I dont have a mind for coding myself... Does it work now?

PostPosted: Tue Jun 05, 2007 3:42 am
by Fuzzy
You goofs. you need a closing ) in the if statement line. Good thing I understand the enemy.

if (this => that )

and no ;

on the same line as the if.

PostPosted: Tue Jun 05, 2007 4:04 am
by d-soldier
d-soldier wrote:I thought I told you to get rid of the "=="
use this example:

if(text_lives.textNumber>0)
{
text_lives.textNumber -= 1;
CreateTimer("Event Actor", "1second", 1000);
}


Isnt that what I posted here?