I try to use it to pass in class [class] and to define the width and height of two reactes. I am doing This is just a simplified version of my initial code and I get an error in the "" token "", the variable descriptor after this token is expected, "Here's my code:
Arrayite TextLines ; Int xpos = 20; Int ypos = 20; Int [] thyatime = new int [2]; Zero setup () {size (1200, 768); TextLines = New Arrayist (); Thyymeem [0] = 3; Thistim [1] = 30;} zero draw () {} press zero mouse () {textlines.add (new line (expose, AOPO, the time). For (Int i = 0; I & lt; TextLines.SEGE (); I ++) {Line P = (Line) Textlines (I); P.display ();}} class line {int x; Int y; Int thatimee []; Line (int xpo, int ypo, int thetimee []) {x = xpo; Y = ypo; Thatimee [] = new int [thetimee.length]; Thatimee [0] = thetimee [0]; Thatimee [1] = thetimee [1];} zero performance () {fill (50, 50, 50); Rect (random (width), random (height), that is [0], that is [0]); Reset (random (width), random (height), same mei [1], thatme [1]); }} The error is in the line
thatimee [] = new int [thetimee.length]; Who knows why?
line (int xpo, int ypo, int thetimee []) {x = xpo; Y = ypo; Thatimee = new int [thetimee.length]; Thatimee [0] = thetimee [0]; Thatimee [1] = thetimee [1]; } You have already declared the variable "thatimee" as an array, remove the "[]" in the scope of the line when starting the variable.
No comments:
Post a Comment