This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Advanced Topics
  •  » look i had a messed up script (What?) syntax errror please(investigate

#1 2008-08-17 08:41:28

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

look i had a messed up script (What?) syntax errror please(investigate

i had a script like this :
When flag pressed
set shotstoreset to 0
Forever&inforev&
if (touching edge or touching goomba or ___ or touching ___
change shotstoreset 1/round 5
end if
if shotstoreset = 100
Clear
set shotstoreset to 0
end if
&outforev&
but imagine this with a red lining around it that pretty much says "this wont work so delete me" anyone have an idea about this anomaly?
                                                                       
                                      /     |------\        ______              555555      666666
                                     |      |      |      |______              5          666     
                                      \     |____/       ______|                555       66666     
                                                                                          55     66     66
                                                                                      5555         666


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#2 2008-08-17 09:28:47

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: look i had a messed up script (What?) syntax errror please(investigate

Check for any problems with anything, really. It gives you a red lining when you try doing impossible things like dividing 4000 by 0 or something.

I'm not sure I understand the script. What does end if mean? And &inforev& means...?

Offline

 

#3 2008-08-17 10:41:04

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: look i had a messed up script (What?) syntax errror please(investigate

As coolstuff says, you probably have a division by zero problem.  Check to see that the denominator of any division you are doing isn't ever zero.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2008-08-17 19:21:15

chalkmarrow
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: look i had a messed up script (What?) syntax errror please(investigate

I agree with the above, as usual. That "round 5" block sounds odd. Do you really mean you are rounding the integer 5 to itself? Or is that an S.

Offline

 
  • Index
  •  » Advanced Topics
  •  » look i had a messed up script (What?) syntax errror please(investigate

Board footer