Array Question.

Non-platform specific questions.

Array Question.

Postby amanuob » Thu Apr 28, 2011 10:47 pm

Uhmm hello every one I would like some help on this problem of mine .. XD...
can anyone please tell if I'm doing this right..?
Code: Select all
int ary[10][10][10];
ary[1][1][2]=10;

sprintf(txt.text," %d ",ary[1][1][2]);

some how it doesnt print?..
Questions are necessary for the development of our own knowing, without questions How would we know??? and lesser would be my posts or none...therefore I know little or none.
User avatar
amanuob
 
Posts: 33
Joined: Sat Aug 29, 2009 11:47 am
Location: In Earth
Score: 1 Give a positive score

Re: Array Question.

Postby skydereign » Thu Apr 28, 2011 11:07 pm

It should work, and it does for me. Do you have anything else setting textNumber or text? And just to make sure, it is a text actor with a valid font, and initial text?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Array Question.

Postby Game A Gogo » Thu Apr 28, 2011 11:25 pm

You can't set text directly in global actions, because it gets run right before text are assigned to your actor (Remember you have to input a string in order to get the text showing)
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