Solved

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

Posted on 2003-11-19
5
433 Views
Last Modified: 2008-02-01
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

0
Comment
Question by:virtex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 9

Accepted Solution

by:
OBCT earned 45 total points
ID: 9783435
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
 
LVL 1

Author Comment

by:virtex
ID: 9784568
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
 
LVL 9

Expert Comment

by:OBCT
ID: 9784865
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
 
LVL 22

Expert Comment

by:rascalpants
ID: 9788055
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
 
LVL 1

Author Comment

by:virtex
ID: 9789055
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how can i learn adobe flex step by step 4 138
YouTube video issue 28 143
Adobe Flash player - Microsoft Edge 9 186
HTML 5 video and audio or Flash 1 85
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question