# lcd screen code problem

#### raw_653

Joined Feb 3, 2012
10
hi all

i wrote a code that is supposed to print the following on the screen
cars number=0
money=0
but when i run it i get
cars number=
money= 0

any solutions ?

the code
int i=0;
int x=0;

char itxt[16];
char xtxt[16];

void screen ()
{inttostr(x,xtxt);
inttostr(i,itxt);
Lcd_out(1,1,"cars number=");
Lcd_out_cp(itxt);
Lcd_out(2,1,"Money=");
Lcd_out_cp(xtxt);
}

thanks

#### spinnaker

Joined Oct 29, 2009
7,835
You are going to have to post your code for Lcdout_cp if you want someone to help. And use the code tags when posting code.

Rich (BB code):
void screen ()
{inttostr(x,xtxt);
inttostr(i,itxt);
Lcd_out(1,1,"cars number=");
Lcd_out_cp(itxt);
Lcd_out(2,1,"Money=");
Lcd_out_cp(xtxt);
}

#### Attachments

• 4.8 KB Views: 47

#### raw_653

Joined Feb 3, 2012
10
which code ?

#### spinnaker

Joined Oct 29, 2009
7,835
I think I already mentioned it.

"You are going to have to post your code for Lcdout_cp if you want someone to help. And use the code tags when posting code."

#### raw_653

Joined Feb 3, 2012
10
this is the code (on mikroc)

#### spinnaker

Joined Oct 29, 2009
7,835

#### raw_653

Joined Feb 3, 2012
10
this the code that is responsible for the data output on the lcd screen

#### raw_653

Joined Feb 3, 2012
10
the result when replacing the two calls

cars number=1
money=2

#### spinnaker

Joined Oct 29, 2009
7,835
Did you look closely at the link to the IntToStr documentation I posted? What differences did you see?

If you did not look at it then why not? You need to put some effort into this too.

#### raw_653

Joined Feb 3, 2012
10
i did and i couldnt find any difference but nvm I am working on another code now

thanks

#### spinnaker

Joined Oct 29, 2009
7,835
i did and i couldnt find any difference but nvm I am working on another code now

thanks
Then you did not look close enough

What is documented: IntToStr
What you have : inttostr

You don't see any differences?