Page 1 of 1
Having trouble printing variables with PP256's CharPrintXY
Posted: Fri Oct 28, 2005 7:57 am
by DaveUnit
I'm using PixelPlus 256's CharPrintXY rather than PRINT. The problem I'm having is that it can only print strings. I need to print variables like health, strength, etc. Is there any somewhat easy way to get the variables I want printed to the screen using CharPrintXY? Or am I just screwed and need to find a better PRINT alternative?
Any and all help will be appreciated, Thanks.
DaveUnit. (I should really register, I go to this site at least a few times a day.)

Posted: Fri Oct 28, 2005 11:29 am
by Kyle
Just use
Charprintxy STR$(variable), x, y, etc.
Instead. You might need to remove a leading space; I can't remember.
Posted: Fri Oct 28, 2005 12:36 pm
by Patz QuickBASIC Creations
Kylemc wrote:Instead. You might need to remove a leading space; I can't remember.
Yes, depending on your program, you might. Replace this with Kylemc's line.
Charprintxy LTRIM$(STR$(variable)), x, y, etc.
-----------------^ That removes the leading space(s).
Posted: Fri Oct 28, 2005 4:17 pm
by DaveUnit
Thanks guys, I actually found the answer on my own after I posted this topic and felt like a total idiot for asking a question with such a simple solution. However, I had no internet access(I was waiting for an important phone call and i have Dial-Up

) to say that I had found the answer already. BUUUT, thanks so much for addressing the leading space problem, that was annoying. It would have taken me awhile to have figured that out on my own.
Thanks again.
DaveUnit.(who still needs to register)
Posted: Fri Oct 28, 2005 4:47 pm
by Kyle
We aim to please

Posted: Tue Nov 01, 2005 5:39 am
by powerhouse
Posted: Tue Nov 01, 2005 5:59 pm
by Patz QuickBASIC Creations
Nathan1993 wrote:Deleted! Wait, I'm not a mod