View previous topic :: View next topic |
Author |
Message |
faizangmc Expert Cheater
Reputation: 0
Joined: 12 Nov 2013 Posts: 167
|
Posted: Sat May 31, 2014 9:56 pm Post subject: Get number of letters ina string? and writeString problem |
|
|
Hi,
Is there any script to return the number of letters users enter in an edit box,
For eg if enter World in an edit box,
It should return 5
I want to assign a variable to it
Like noofletters = (script to get the number of letters in edit box named CEEdit1)
Also, when I writeScript on an adress. If its the same no of letters it goes fine
But if there is one letter more in the New name, then it writes only equal no of.letters like before. Any fix.for this?
Thank you |
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Jun 01, 2014 3:15 am Post subject: |
|
|
Code: | stringLength = #(UDF1.CEEdit1.Text)
print(stringLength) |
Quote: | then it writes only equal no of.letters like before |
Nope, writeString function always tries to write whole string you passed as an argument.
You can be 100% sure that nothing bad happens, only when you write the same number of letters or something shorter. _________________
|
|
Back to top |
|
 |
faizangmc Expert Cheater
Reputation: 0
Joined: 12 Nov 2013 Posts: 167
|
Posted: Sun Jun 01, 2014 3:18 am Post subject: |
|
|
K thankx
If we write smthng longer then?
As some team names are longer some are shorter
Suppose I want to rename India as England
And England as India
Then, England to india will work fine
But wull changinf India to England also work well? |
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Jun 01, 2014 3:40 am Post subject: |
|
|
faizangmc wrote: | But wull changinf India to England also work well? |
It depends. Highlight 'India' string address you added to cheat table, press CTRL+B.
If it looks like this:
(when you have many 00 just after)
Then probably you can write something bigger. _________________
|
|
Back to top |
|
 |
|