KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Aug 2015 08:03 PM |
local word = "a" local tf = true;--textfits stands for tf
for i = 1, string.len(text) do wait() local letter = string.sub(text, i, i); l.Text = l.Text..letter if l.TextFits == false then l.Text = l.Text..word; wait(5) tf = l.TextFits; l.Text = string.sub(l.Text, 1, string.len(l.Text)-(string.len(word))); if tf == false then table.insert(Pages, string.sub(l.Text, 1, string.len(l.Text)-1)); l.Text = ""; local fS = string.sub(text, 1, i); local lS = string.sub(text, i, string.len(text)); text = fS..(string.sub(text, string.len(text), string.len(text)))..lS end end end
Sorry, its a lot, been i've been trying so many ways.
Anyways, theres string called this
local text = "hole article on polar bears from the wiki"
So, I want it to split it up into pages which i can acess later.
So, I use
"l" an example page, and have it write it out word by word.
The problem is when to go to the next page.
I use the TextFits property, and make it go back a letter.
BUT, since i write it out word by word, once it gets to the edge, it quickly says that the TextFits property is true, since sometimes it goes over a bit.
I keep trying to fix it, and you can see in my methods above, like added a letter and if its still false then do it. But it still does not work.
Please help!
If you need more info just post here what u want
|
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
| |
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Aug 2015 08:09 PM |
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 23 Aug 2015 08:15 PM |
If you are trying to make new lines
print'Ye,\nYe.' |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Aug 2015 08:15 PM |
| No, im not trying to make news lines, not really. |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
| |
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 23 Aug 2015 08:22 PM |
function Split(text) return text:sub(1,#text/2),text:sub(#text/2+1) end |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Aug 2015 08:24 PM |
ok!
So here is the page that it types out "text" on.
It goes letter by letter ------------ | | | | | | | | | | | | ------------
------------ |h | | | | | | | | | | | ------------
------------ |hi | | | | | | | | | | | ------------
so lets say it gets to the end of the line
------------ |hi the name| | | | | | | | | | | ------------
See? The Text does not fit!
So, in the script, it thinks its at the end of the page, since thats where it should start not fitting, so it starts a new page.
How do i get around this? |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Aug 2015 08:25 PM |
It was a box when i posted it.........
woops |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 23 Aug 2015 08:26 PM |
| Maybe the Y longer and turn on TextFit? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2015 08:26 PM |
| can you just take a screenshot, I can't really understand it when people 'draw' on the forums. |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Aug 2015 08:27 PM |
| where should i post the screenshot? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2015 08:27 PM |
| prnt scr/img ur or something |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Aug 2015 08:28 PM |
u almost have 35k posts :D
and ok One second.
|
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
| |
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 23 Aug 2015 08:39 PM |
| I almost have - o w8 I don't know qq |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Aug 2015 08:42 PM |
I got the textfits and the pages.
h tt p : / /im gur . com/DEr 1Oel
Remove all the spaces it wont let me post it for some reason
In the meantime:
AHG THE FLOOD CHECK IS KILLING ME
I WISH IT HAD A TIMER
NOT AGAINNNNNN CMON LEMME POSTTTTT
I CANNOT BELIVE THIS
I AM GETTING MAD
1, 2,,,,,, 333333333,,,,,,,,,,4,,,,,,,5
Wish me luck. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2015 08:44 PM |
What's supposed to happen?
Also I just saw this in your script: 'tf = l.TextFits; l.Text = string.sub(l.Text, 1, string.len(l.Text)-(string.len(word)));'
You might want to flip it, so tf = l.TextFits comes after |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
| |
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
| |
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Aug 2015 08:52 PM |
| um, its supposed to check if its at the end, the way i see it, if i add another letter, then it will fit again, and then i remove it after i record if the textfits or not, but it hasnt been working out, |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 23 Aug 2015 08:53 PM |
@Kev, uhrm is there a reason u didn' compliment my post count, we had a chain going qq
but sorry that your method isn't working out for ya, do u wanna use text scaled or nu |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2015 08:55 PM |
| So the 'a' should go on the other page or am I completely misunderstanding this |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 23 Aug 2015 08:57 PM |
ok, i want it to fill out a page, insert it into a table, then restart until all the text is gone through.
How can I do this?
Im using TextFits, and sometimes in TextWrapped = true, the Text does not fit on a line.
Is there a way i can fix that? |
|
|
| Report Abuse |
|
|