|
Author |
Topic: register # contains wrong type (Read 260 times) |
|
Elrick
|
register # contains wrong type
« on: Jul 12th, 2003, 2:49am » |
|
"register # contains wrong type" I've gotten this error in all three of the projects that I've started since I downloaded v56.. IT is boggling my mind! Here is a hacked-down snippet.. Code: gridPoint[] gs; void setup() { gs = new gridPoint[50]; for(int i=0;i<50;i++) { int theC = color(50,100,190); gs[i] = new gridPoint(0,0,0, theC); } } class gridPoint { int x,y,z; int d; int c; gridPoint(int sx, int sy, int sz, int col) { x = sx; y = sy; z = sz; d = int(random(0,6)); c = col; } } |
| Is says that register 4 contains wrong type.. and sure enough: comment out d = int(random(0,6)); and the error goes away. Eeeeeee... (Right now I'm just making a class function called start() or something and calling that every time I create a new object.. but that's poopy.)
|
« Last Edit: Jul 12th, 2003, 2:59am by Elrick » |
|
|
|
|
fry
|
Re: register # contains wrong type
« Reply #2 on: Jul 27th, 2003, 7:42pm » |
|
ivrea sponsored hacker dan mosedale has repaired this by plugging in support for a better compiler. the results will be available in 57.
|
|
|
|
|