HELP

Non-platform specific questions.

HELP

Postby Agusstosus15 » Wed Oct 12, 2011 10:40 am

I'm a beginner so have mercy.
I declared string variable named nazwy.

In script i try to put text in it like:

nazwy="wow";

it not work i got a script error - illegal declaration -, how is that ? and sorry for my english
Agusstosus15
 
Posts: 59
Joined: Sun Oct 09, 2011 7:59 pm
Score: 0 Give a positive score

Re: HELP

Postby Game A Gogo » Wed Oct 12, 2011 11:27 am

you can't assign text to strings like that, you need to use strcpy(output,input);
for exemple:

strcpy(nazwy,"wow");

there are other ways like with sprintf, but that's when you want special formating
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

Re: HELP

Postby Agusstosus15 » Fri Oct 14, 2011 11:36 am

big thanks,

one more question can i create actor using string , eg:

create actor( string variable,.... ?
Agusstosus15
 
Posts: 59
Joined: Sun Oct 09, 2011 7:59 pm
Score: 0 Give a positive score

Re: HELP

Postby Game A Gogo » Fri Oct 14, 2011 11:53 am

yes! but make sure to have the correct animation name for it as well!
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

Re: HELP

Postby Agusstosus15 » Fri Oct 14, 2011 12:31 pm

chee my life is much easier now and I mean it, it give a power to control sprite using variables, I'm so glad thank you and don't focus on my language it's so so I come from poland, thanx :0
Agusstosus15
 
Posts: 59
Joined: Sun Oct 09, 2011 7:59 pm
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest