Loading...
Logo
Processing Forum
guilherme.barreto's Profile
1 Posts
0 Responses
0 Followers

Activity Trend

Last 30 days
Show:
Private Message
    Hi,

    I feel like I must apologize for creating an topic just for asking such an elementary question, so sorry for that. I didn't find a clue for this anywhere! To the point: I'm trying to declare an the values of an array literally. No "for loops", just straight to the point.
    1. //I'm declaring it globally, as such:
      int [] previousCoordinates;
    2. //Afterwards, I'm attempting to put some values in it, as such:
      if (mousePressed)      
    3. {
    4.       //Processing points to an error in the following line, stating a Syntax error and "possibly missing a ] character"
    5.       previousCoordinates = new int [ mouseX, mouseY],
    6. }
    I've also tried using the "previousCoordinates = { mouseX, mouseY }" syntax, but then an Unexpected Token error occurs.