Array help needed

Non-platform specific questions.

Array help needed

Postby savvy » Fri May 06, 2011 7:57 am

i know most things on game-editor, however i have never had to use arrays previously.
i know that...
int array[10] makes 10 integers, but my problem is this:

when i use...
if(array[cloneindex]==1)something;

it comes up with a READ error.

help please? i need someone to just explain arrays for me.

savvy
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score

Re: Array help needed

Postby skydereign » Fri May 06, 2011 8:01 am

How many actors have that code? If a clone with cloneindex of 10 or greater tries to run that code it will give a read error.
READ attempted beyond allowed access area
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Array help needed

Postby savvy » Fri May 06, 2011 11:25 am

ok, problems solved, i now have a game-editor issue... when i clone my ground to make actor.1, it makes actor.120 -___- game-editor hasnt removed the data from the previous clones. any way to remove these?
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score

Re: Array help needed

Postby schnellboot » Fri May 06, 2011 11:54 am

no
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Array help needed

Postby Game A Gogo » Fri May 06, 2011 1:55 pm

The best way to never have this problem is to create your actors in script, but for you it seems already too late S:
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest