Expecting RCURLY found 'if' error ?!
in
Programming Questions
•
1 year ago
Hey guys,
I hope this is the right threat to post this question (I'm new to this forum)…
I have this script and it went well for a few tries but I think I added some strange things and no it gives me the error mentioned above …
- class Popup{
- String standort,art;
- float preis;
- int koordx;
- int koordy;
- float preis_vorge,preis_geste,preis_heute;
- Popup(String ort,String oil,float price1, float price2, float price3, int x, int y)
- {
- standort=ort;
- art=oil;
- preis_vorge=price1;
- preis_geste=price2;
- preis_heute=price3;
- koordx= x;
- koordy= y;
- }
- void generate(){
- noStroke();
- fill(128,205,225,255);
- rectMode(CORNER);
- rect (koordx,koordy,180,-200);
- triangle(koordx,koordy,koordx+30,koordy,koordx,koordy+30);
- //
- fill(255);
- textFont(font);
- textMode(CORNER);
- textSize(12);
- text("Name der Tankstelle: " + standort,koordx+5,koordy-180);
- text(art + "preis Vorgestern: ",koordx+5,koordy-160);
- fill(120);
- text(preis_vorge + "€");
- fill(255);
- text(art + "preis Gestern: ",koordx+5,koordy-140);
- //+-=
- if (preis_geste<preis_vorge)
- { fill(0,255,0);
- }
- if (preis_geste == preis_vorge)
- {
- fill(255,255,0);
- }
- if (preis_geste>preis_vorge)
- {
- fill(255,0,0);
- }
- text(preis_geste + "€");
- fill(255);
- //ende
- text(art + "preis Heute: ",koordx+5,koordy-120);
- //+-=
- if (preis_heute<preis_geste)
- { fill(0,255,0);
- }
- if (preis_heute == preis_geste)
- {
- fill(255,255,0);
- }
- if (preis_heute>preis_geste)
- {
- fill(255,0,0);
- }
- text(preis_heute + "€");
- fill(255);
- //ende
- //
- }}
Hope anyone can help me :)
Thanks a lot !
1