No worries. The only time I want to use a single quote is when I use contractions; eg, can't for cannot. So, I just won't use contractions. :LOL:
If I want to quote something or emphasize a phrase, I will use \".
Thanks so much for taking the time to look at this and responding. You know, I use a lot of your scripts plus the two utility code libraries. I especially found the code for "hidden objects" quite useful.
The attached file is the word wrap script I coded for GG. A long time ago,in a galaxy far, far away, I wanted the ability to word wrap in FPSC. This was in the era we were able to actually have the source code for the engine and if you got DBPro you were all set. I first searched various engine source codes. I Found something in C used in one of the few game engines I had access to. I then proceeded to translate it into DBPro which was the source code for FPSC. This language was similar to VB. It allowed the ability to access a single letter using a loop. here is the code for DBPro.
function rpg_showtalkbox()
local i as integer
`
tbwa_sTemp$ = tbwa_text$
tbwa_sTemp$ = tbwa_sTemp$ + " "
tbwa_lines = 1
`
set text font rpg_chattextstyle.fontname$
set text size rpg_chattextstyle.fontsize
if rpg_chattextstyle.fontbold = 1
set text to bold
else
set text to normal
endif
`
while text width(tbwa_sTemp$) > tbwa_width
tbwa_length = len(tbwa_sTemp$)
for i = 1 to tbwa_length
if mid$(tbwa_sTemp$, i) = " "
tbwa_wIndex = i
endif
if text width(left$(tbwa_sTemp$,i)) > tbwa_width
inc tbwa_lines
exit
endif
next i
tbwa_sTemp$ = right$(tbwa_sTemp$,tbwa_length-tbwa_wIndex)
endwhile
`
tbwa_height = text height(tbwa_text$) * (tbwa_lines)
ink tbwa_bColor,0
box tbwa_x,tbwa_y,tbwa_x+tbwa_width,tbwa_y+tbwa_height
ink tbwa_tColor,0
wrapText(tbwa_x,tbwa_y,tbwa_text$,tbwa_width,0)
`
endfunction
You will notice there is a command Lua doesn't have and that is "mid$" which allows you to parse one character at a time. What I decided to do with Lua was to break it down into word chunks and placed them in a table. I then concatenated each chunk until it formed a line of text that fit the desired text width. The number of lines is determined by length of the string divided by the desired length of the line. In the example, I used "70" as the length.
I congratulate all of you who has read this to the end. Kudos and commendations to you. I realize this is a long-winded post, however, I enjoyed writing it for the nostalgia and a pat on God's back for helping me figure out the logic and writing of the Lua code. For something that would have taken me one afternoon to write, in my state, it took me several weeks off and on to write. Part of the delay is not listening to the Holy Spirit on several occasions.
Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory