Question: I just tried running my game on a friend's laptop, but for some reason it crashes. The exported .jar runs fine on my machine, and some others too. I can see that is has something to do with the glDrawArrays function, that is this code:

```
glPushMatrix();

glTranslatef(pos.x*world.chunkSize.x, 0.0f, pos.y*world.chunkSize.z);

glBindBuffer(GL_ARRAY_BUFFER, vao_id);

glVertexAttribPointer(world.game.positionAtt, 3, GL_FLOAT, false, 36, 0);
glVertexAttribPointer(world.game.normalAtt, 3, GL_FLOAT, false, 36, 12);
glVertexAttribPointer(world.game.texCoordAtt, 2, GL_FLOAT, false, 36, 24);
glVertexAttribPointer(world.game.lightAtt, 1, GL_FLOAT, false, 36, 32);

glDrawArrays(GL_TRIANGLES, 0, arraySize / 9);

glBindBuffer(GL_ARRAY_BUFFER, 0);

glPopMatrix();

```

As said, the exact same .jar runs fine on my system, and some more I have tried it on.

My friend's pc has Intel HD Graphics 3000, with GLSL version 1.40 and OpenGL 3.1.0.

Crash dump: <http://pastebin.com/X8x4xX8j>

Thanks in advance.

Answer: 
The function you want is `instance_number(obj)` ([documentation found here](http://docs.yoyogames.com/source/dadiospice/002_reference/objects%20and%20instances/instances/instance%20functions/instance_number.html)). 

> 
> This functions returns the number of instances of a object that exist
>  in the current room.
> 
> 
>
I think it is because there is no jellyfish instances in the failure room. What you can do (I don't think this works in gamemaker 8.1, you actually have to use the room number, which is an integer (1, 2, 3, etc.)), but assuming you are using gamemaker studio you should use this, where failureroom is the name of the failure room:

```
if room != failureroom
    {var ammo = instance_count(jellyfish)+2}

```

In this script the curly brackets are not necessary, but if you have more lines of code in the test like maybe you set the health as well, you have to use it.

Example:

```
if room != failureroom
    {var ammo = instance_count(jellyfish)+2
    var health = instance_count(jellyfish)+2}

```

If you do:

```
if room != failureroom
    var ammo = instance_count(jellyfish)+2
    var health = instance_count(jellyfish)+2

```

It will always change the health, even if you're in the failure room, but it will only change the ammo if youre not in the failure room.