Operator '+' must be followed by an operand. and other errors'......

needing help with these. Using flash 2004. Not used to syntex............. would give my left eyebrow if someone could fix for me!.

http://webpages.comnetservices.com/gpc.zip

thanks alot!!!




**Error** Symbol=Symbol 46, layer=actions, frame=4:Line 2: Operator '+' must be followed by an operand
         setProperty("/treeSign", _xscale , Number (Number (current_size) + 20) + Number (/:carSpeed * 10));

**Error** Symbol=Symbol 46, layer=actions, frame=4:Line 3: Operator '+' must be followed by an operand
         setProperty("/treeSign", _yscale , Number (Number (current_size) + 20) + Number (/:carSpeed * 10));

**Error** Symbol=Symbol 94, layer=actions, frame=5:Line 5: Operator '*' must be followed by an operand
             carsize = Number (carsize) + Number (4 + Number (4 * /:carSpeed));

**Error** Symbol=Symbol 94, layer=actions, frame=5:Line 6: Operator '*' must be followed by an operand
             carY = Number (carY) + Number (7 + Number (7 * /:carSpeed));

**Error** Symbol=Symbol 107, layer=actions, frame=5:Line 5: Operator '*' must be followed by an operand
             carsize = Number (carsize) + Number (4 + Number (4 * /:carSpeed));

**Error** Symbol=Symbol 107, layer=actions, frame=5:Line 6: Operator '*' must be followed by an operand
             carY = Number (carY) + Number (7 + Number (7 * /:carSpeed));

**Error** Scene=Scene 1, layer=actions, frame=80:Line 33: Unexpected '/' encountered
         if (Number (/:carColour) == 2) {

**Error** Scene=Scene 1, layer=actions, frame=80:Line 35: Unexpected '/' encountered
         } else if (Number (/:carColour) == 3) {

**Error** Symbol=Symbol 108, layer=actions, frame=2:Line 1: Unexpected '/' encountered
         if (Number (/:carSpeed) == 1) {

**Error** Symbol=Symbol 113, layer=actions, frame=2:Line 1: Unexpected '/' encountered
         if (Number (/:carSpeed) == 1) {

**Error** Symbol=Symbol 172, layer=L10, frame=1:Line 2: Operator 'and' must be followed by an operand
         if ((Number (sky_move) == 5) and (Number (/:carSpeed) == 1)) {

**Error** Symbol=Symbol 172, layer=L10, frame=1:Line 5: Operator 'and' must be followed by an operand
         if ((Number (sky_move) == Number (-5)) and (Number (/:carSpeed) == 1)) {

**Error** Symbol=Symbol 172, layer=L10, frame=1:Line 8: Operator 'and' must be followed by an operand
         if ((Number (sky_move) == 10) and (Number (/:carSpeed) == 0)) {

**Error** Symbol=Symbol 172, layer=L10, frame=1:Line 11: Operator 'and' must be followed by an operand
         if ((Number (sky_move) == Number (-10)) and (Number (/:carSpeed) == 0)) {

**Error** Symbol=Symbol 172, layer=L14, frame=1:Line 2: Operator 'and' must be followed by an operand
         if ((mountain_move == 10) and (/:carSpeed == 1)) {

**Error** Symbol=Symbol 172, layer=L14, frame=1:Line 5: Operator 'and' must be followed by an operand
         if ((mountain_move == -10) and (/:carSpeed == 1)) {

**Error** Symbol=Symbol 172, layer=L14, frame=1:Line 8: Operator 'and' must be followed by an operand
         if ((mountain_move == 20) and (/:carSpeed == 0)) {

**Error** Symbol=Symbol 172, layer=L14, frame=1:Line 11: Operator 'and' must be followed by an operand
         if ((mountian_move == -20) and (/:carSpeed == 0)) {

**Error** Symbol=Symbol 172, layer=actions, frame=5:Line 1: Unexpected '/' encountered
         if (/:carSpeed == 1) {

**Error** Symbol=Symbol 172, layer=actions, frame=5:Line 2: Unexpected '/' encountered
             Set("sky_strip:sky_move", -/:skyMoveFast);

**Error** Symbol=Symbol 172, layer=actions, frame=31:Line 1: Unexpected '/' encountered
         if (/:carSpeed == 1) {

**Error** Symbol=Symbol 172, layer=actions, frame=31:Line 2: Unexpected '/' encountered
             Set("sky_strip:sky_move", /:skyMoveFast);

**Error** Scene=Scene 1, layer=L73, frame=130:Line 2: Unexpected '/' encountered
         if (/:gameSound) {

**Error** Scene=Scene 1, layer=L80, frame=130:Line 2: Unexpected '/' encountered
         if (/:gameSound) {

**Error** Scene=Scene 1, layer=actions, frame=131:Line 14: Operator '<' must be followed by an operand
         if ((0 < Number (/:carSpeed)) or (Number (step2) == 1)) {

**Error** Scene=Scene 1, layer=actions, frame=131:Line 290: Operator '+' must be followed by an operand
             setProperty("/player", _x , getProperty("/player", _x) - (6 + Number (/:carSpeed * 2)));

**Error** Scene=Scene 1, layer=actions, frame=131:Line 293: Operator '+' must be followed by an operand
             setProperty("/player", _x , Number (getProperty("/player", _x)) + Number (6 + Number (/:carSpeed * 2)));

**Error** Scene=Scene 1, layer=actions, frame=131:Line 322: Unexpected '/' encountered
                 setProperty("/player", _x , /:car_x - 20);

**Error** Scene=Scene 1, layer=actions, frame=131:Line 323: Unexpected '/' encountered
                 Set("/:damage", Number (/:damage) + 5);

**Error** Scene=Scene 1, layer=actions, frame=131:Line 331: Unexpected '/' encountered
                 setProperty("/player", _x , Number (/:car_x) + 20);

**Error** Scene=Scene 1, layer=actions, frame=131:Line 332: Unexpected '/' encountered
                 Set("/:damage", Number (/:damage) + 5);

**Error** Scene=Scene 1, layer=actions, frame=131:Line 342: Unexpected '/' encountered
             if ((Number (/:car_x) >= 286) and (Number (_root.bonus.side) == 1)) {

**Error** Scene=Scene 1, layer=actions, frame=131:Line 343: Unexpected '/' encountered
                 Set("/:score", Number (/:score) + 25);

**Error** Scene=Scene 1, layer=actions, frame=131:Line 354: Operator '>=' must be followed by an operand
             if ((250 >= Number (/:car_x)) and (Number (_root.bonus.side) == 0)) {

**Error** Scene=Scene 1, layer=actions, frame=131:Line 355: Unexpected '/' encountered
                 Set("/:score", Number (/:score) + 25);

**Error** Symbol=Symbol 227, layer=L5, frame=1:Line 2: Unexpected '/' encountered
         if (/:gameSound) {

**Error** Symbol=Symbol 237, layer=L4, frame=1:Line 2: Unexpected '/' encountered
         if (/:gameSound) {

**Error** Symbol=Symbol 237, layer=actions, frame=26:Line 1: Operator '-' must be followed by an operand
         bonus = (200 - /:damage) * 10;

**Error** Symbol=Symbol 237, layer=actions, frame=41:Line 1: Operator '-' must be followed by an operand
         timeBonus = 5000 - /:time;

**Error** Symbol=Symbol 237, layer=actions, frame=43:Line 1: Unexpected '/' encountered
         Set("/:score", Number (Number (/:score) + Number (timeBonus)) + Number (bonus));

**Error** Symbol=Symbol 255, layer=L4, frame=1:Line 2: Unexpected '/' encountered
         if (/:gameSound) {

**Error** Symbol=Symbol 255, layer=actions, frame=47:Line 1: Operator '-' must be followed by an operand
         bonus = (200 - /:damage) * 10;

**Error** Symbol=Symbol 255, layer=actions, frame=50:Line 1: Unexpected '/' encountered
         Set("/:score", Number (/:score) + Number (bonus));

**Error** Symbol=Symbol 255, layer=actions, frame=77:Line 1: Operator '-' must be followed by an operand
         timeBonus = 5000 - /:time;

**Error** Symbol=Symbol 255, layer=actions, frame=80:Line 1: Unexpected '/' encountered
         Set("/:score", Number (/:score) + Number (timeBonus));

**Error** Symbol=Symbol 262, layer=L8, frame=1:Line 2: Unexpected '/' encountered
         if (/:gameSound) {

**Error** Scene=Scene 1, layer=actions, frame=205:Line 4: Unexpected '/' encountered
             if (Number (/:track) == 2) {

Total ActionScript Errors: 47        Reported Errors: 47

LVL 1
virtexAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

OBCTCommented:
I'm not sure if this is the problem, but check that you are not using ActionScript 2.0 because I had a similar problem using mx 2004 and once I switched it to ActionScript 1.0 it worked fine.
I hope this helps.

Cheers

-OBCT
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
virtexAuthor Commented:
I just tried it and it seems to work but has some major glitchs still. once I figure out how to fix them I will post a answer and you should recieve 1/2 the points or more. thanks alot ^_^
0
OBCTCommented:
If you don't mind, you can post your code here and the errors you're getting and I'll see if I can do anything more to help.
0
rascalpantsCommented:
It seems you need to just update all of your code...

setProperty is from Flash 4  ...  live in the now  :)

dot syntax is so much better...

the major problem I see from your posting is that you are using "/:"  instead of a specific reference like "_root."


anywhere you use "set" or are trying to set a variable or property, you should use code like this:

//for a property:

_root.movieClipInstanceName._alpha = 50;

//for a variable:

_root.phoneNumber1 = "(800) 555-1212";


the above movieclip and variable are on the root time line...  if you have a movieclip or variable in a level or movieclip that is not in the root, then you need to make sure you paths are set up correctly...


_root.movieClipInstanceName1.movieClipInstanceName2.variableName = "chicken";


the above sets a variable that is inside of a movieclip that is inside of another movieclip the value of "chicken"...



rp


0
virtexAuthor Commented:
I got it fixed code wise after I spoke with someone on here(the first guy) after I published it as a older version(which the file is absed off of) and did action script 1.0 it works except there are some mask I need to fix. I got it done so heres the points to the first. Guys thanks for the thoughts and yea I know old habits die hard and am trying to update all my older applications
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.