Computer Science Canada um helppppppppp |
Author: | cinnamonhugs [ Fri Mar 31, 2006 8:39 pm ] |
Post subject: | um helppppppppp |
im trying to make a triangle move using drawfillpolygon but it keeps saying there are errors, whats the error? for a : 420 .. 700 by 5 var x : array 1 .. 3 of int := init (350, 350, 440) var y : array 1 .. 3 of int := init (130, 180, 130) drawfillpolygon (x + a, y, 3, 102) drawpolygon (x + a, y, 3, 103) delay (50) drawfillpolygon (x + a, y, 3, 77) drawpolygon (x + a, y, 3, 77) end for |
Author: | Tony [ Fri Mar 31, 2006 8:53 pm ] |
Post subject: | |
you can't add arrays and integers together. Different types. |
Author: | person [ Fri Mar 31, 2006 8:53 pm ] | ||
Post subject: | |||
1)
2) http://www.compsci.ca/v2/viewtopic.php?t=461 3) an array of integers is not the same as an integer, only an index of an array of integers can be added to an integer |
Author: | Clayton [ Sat Apr 01, 2006 8:06 pm ] | ||
Post subject: | |||
In your case you had it mostly right but you missed one thing
so what you need to do is add a single element of your array to an integer, not the entire array |