# Loading data into the processing

**URL:** https://discourse.processing.org/t/loading-data-into-the-processing/11949
**Category:** Coding Questions
**Created:** [June 9, 2019, 7:32pm UTC](https://discourse.processing.org/t/loading-data-into-the-processing/11949 "2019-06-09T19:32:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![BallazX](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@BallazX](https://discourse.processing.org/u/BallazX)
#### Post date: [June 9, 2019, 7:32pm UTC](https://discourse.processing.org/t/loading-data-into-the-processing/11949/1 "2019-06-09T19:32:18Z")

</div>

Hey,

Im trying to load some data from a csv file.  
 ![K%C3%A9pkiv%C3%A1g%C3%A1s](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/3380fa5c6c3bb4b7c937437784e85dcb46eee22e.png)  
The data tab contains this code:

```auto
Table data=loadTable("values.csv");
TableRow row=data.getRow(0);
float x1=row.getInt(0);
float y1=row.getInt(1);
float x2=row.getInt(2);
float y2=row.getInt(3);
float x3=row.getInt(4);
float y3=row.getInt(5);
float x4=row.getInt(6);
float y4=row.getInt(7);
float x5=row.getInt(8);
float y5=row.getInt(9);
float x6=row.getInt(10);
float y6=row.getInt(11);
float x7=row.getInt(12);
float y7=row.getInt(13);
float x8=row.getInt(14);
float y8=row.getInt(15);
int a=row.getInt(16);
int b=row.getInt(17);

```

And what I get is this error:

 ![K%C3%A9pkiv%C3%A1g%C3%A1s2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/d/de695ae995d468ebfb7dd0a85bfa158902582613.png)

What could be the problem here?

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [June 9, 2019, 9:06pm UTC](https://discourse.processing.org/t/loading-data-into-the-processing/11949/2 "2019-06-09T21:06:16Z")

</div>

I’ve spotted this red error message: 🕶

> Files must be loaded inside **setup()** or after it…

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [June 11, 2019, 3:29pm UTC](https://discourse.processing.org/t/loading-data-into-the-processing/11949/3 "2019-06-11T15:29:40Z")

</div>

For simplicity, just put your row.getint() calls directly into your drawingFunc arguments. No need for 12 extra global variables – row is the variable. If you want to make it more readable you can name the table columns and get them by column name.
