|
| 29 Feb 2012 05:51 PM |
If I run the below code, I get a message in output saying "[...].Screen:7: ')' expected near '[' ". Any clues how to fix this? I have already tried a lot.
Line 7: ------------------------------------- function pixel[x][y]:To(color) pixel[x][y][Object.BrickColor] = BrickColor.new(color) end ------------------------------------- |
|
|
| Report Abuse |
|
|
|
| 29 Feb 2012 05:52 PM |
| That not Lua, I don't think. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 29 Feb 2012 05:59 PM |
It is Lua. Reason you don't understand it is because it's not your code and it's only a function.
"Bro five! Wear this to let everyone know you think they deserve a high five." |
|
|
| Report Abuse |
|
|
|
| 29 Feb 2012 06:08 PM |
| I'm not loooking for understanding, but rather what is wrong with the syntax. x and y are variables, Object.BrickColor refurres to a indexed part. All that is fine, there is only an error in the syntax. I have indexed using the [] before, it is the only way to do so I know of with variables. It only comes to an error on this method (the only method). |
|
|
| Report Abuse |
|
|