Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why am I not seeing my _printstring output?
#1
just by looking at the code, can anyone tell me why my _PRINTSTRING (760,560) [line 47] is not showing up?  I've set COLOR to 0 for Layer(1) [lines 7 and 8] as the screen color is WHITE, and I know that works because I would lose my debugging values in the overworld screen (BLACK) after exiting the inventory. I added a screen shot of the output, which the screen size is 800x600 so 760x560 should still be on the screen. I also have a _PRINTMODE _KEEPBACKGROUND for layer(1) at the top of my startup code, so I should see a BLACK "0" in the currency box with the white background remaining, but its not showing up.
I have to be doing something wrong but, I've been working on this code for a while and have become blind to what I could have messed up.

Code: (Select All)
SUB Inventory
STATIC Inhand AS _BYTE, Moving AS _BYTE
Tmp& = _COPYIMAGE(_DISPLAY)
OldS = _SOURCE
OldD = _DEST

_DEST Layer(1)
COLOR 0 ' set layer(1) text color to black for currency

_DEST Layer(8)
_SOURCE Layer(8)

I_Base& = _COPYIMAGE(Layer(6))
'------------------Build Screen Base---------------------------
Build_Inventory_Screen I_Base&, Ys%%, Xs%%
'--------------------------------------------------------------
'----------------------click layer setup-----------------------
Build_Inventory_Click_Screen
'--------------------------------------------------------------


DO
  IF _KEYDOWN(27) THEN ExitFlag%% = TRUE
  _PUTIMAGE , I_Base&, Layer(1)

  '-----------------------Place Body Inventory-------------------
  FOR i% = 1 TO 7
  Display_item_Inventory IL(i%).X, IL(i%).Y, E(i%)
  NEXT
  '--------------------------------------------------------------
  '----------------------Place LOAD inventory--------------------
  FOR Iy%% = 0 TO Ys%%
  FOR Ix%% = 0 TO Xs%%
    IF InventoryLoad(Ix%%, Iy%%) THEN Display_item_Inventory 479 + 72 * Ix%%, 40 + 64 * Iy%%, InventoryLoad(Ix%%, Iy%%)
  NEXT: NEXT
  '--------------------------------------------------------------
  IF _MOUSEBUTTON(1) THEN 'left click
  Clicked~& = POINT(_MOUSEX, _MOUSEY)
  IF _RED32(Clicked~&) = 128 THEN Result%% = Inventory_Equiped_Click_AI(Inhand, Moving, Clicked~&) 'equiped inventory slot selected
  IF _RED32(Clicked~&) = 255 THEN Result%% = Inventory_Load_Click(Inhand, Moving, Clicked~&)
  IF _RED32(Clicked~&) = 129 THEN Result%% = Inventory_Cash_Out(Inhand, Moving)
  DO: n = _MOUSEINPUT: LOOP WHILE _MOUSEBUTTON(1)
  END IF

  IF Moving THEN Display_item_Inventory _MOUSEX, _MOUSEY, Inhand

  _PRINTSTRING (760, 560), "0", Layer(1) '- 9 * LEN(LTRIM$(STR$(P.Currency))) ,LTRIM$(STR$(P.Currency))

  _PUTIMAGE , Layer(1), Layer(0)
  _LIMIT 60
  DO: LOOP WHILE _MOUSEINPUT
LOOP UNTIL ExitFlag%%

'---------Restore originals---------
_PUTIMAGE , Tmp&, Layer(0)
_SOURCE OldS
_DEST Layer(1)
COLOR 15 'restore print color
_DEST OldD
'-----------Free temps--------------
_FREEIMAGE Tmp&
_FREEIMAGE I_Base&
'----------Clear buffer-------------
_KEYCLEAR
_DELAY .25
_KEYCLEAR

END SUB


[Image: nooutput.jpg]
Reply
#2
Is it offscreen?  What's the screen dimensions?
Is it a 32-bit screen?  0 is _RGBA32(0,0,0,0).  Do you want COLOR _RGB32(0,0,0) instead?
Reply
#3
(05-19-2025, 03:28 AM)SMcNeill Wrote: Is it offscreen?  What's the screen dimensions?
Is it a 32-bit screen?  0 is _RGBA32(0,0,0,0).  Do you want COLOR _RGB32(0,0,0) instead?
opps... that's right forgot I have to use _RGB32() .
Knew it was something simple, just was looking at the code for too long with out a break.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help: Issues with the _PRINTSTRING and _INPUTBOX$ functions in QB64. qbfans 2 351 02-13-2026, 06:07 AM
Last Post: qbfans
  Make IDE $Console:Only output readably large dakra137 1 526 10-10-2025, 12:21 PM
Last Post: hsiangch_ong
  using a custom tileset as a fixed-width font for _PrintString ? madscijr 11 2,247 06-05-2025, 05:50 PM
Last Post: madscijr
  Inputting output from other languages Helium5793 8 1,260 05-30-2025, 12:30 PM
Last Post: Helium5793
  Scrolling Output That Exceeds Screen Size Tim 17 3,300 04-19-2024, 07:22 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)