Well I made this "secret" code but I need to make a translator for it. The letters/numbers are just changed a little. For example: a -12 and 4-r and %-g. Is it possible? I was wandering of some window showing up and you type in the code and then it translate by checking each code and then giving you a translation. Like this.
319163
c9163
co63
con
Can you give me an example?
Is This Possible?
Started by Constanta, Apr 16 2010 03:01 AM
4 replies to this topic
#1
Posted 16 April 2010 - 03:01 AM
#2
Posted 16 April 2010 - 03:32 AM
A way to do what you want is to use the string_replace_all().
This example may not be exactly what you want but it will point you in the right direction.
text = get_string("Enter text to be translated","");
text = string_replace_all(text,"a","12");
text = string_replace_all(text,"4","r");
text = string_replace_all(text,"%","g");
show_message(text);This example may not be exactly what you want but it will point you in the right direction.
Edited by Vivi_IX, 16 April 2010 - 03:33 AM.
#3
Posted 16 April 2010 - 03:42 AM
THANX
Yeah i need some improvement cuzz it's weird and some times messes up
Yeah i need some improvement cuzz it's weird and some times messes up
#4
Posted 16 April 2010 - 04:03 AM
Tell me exactly what the problem is or what you need.
#5
Posted 16 April 2010 - 08:19 AM
Tell me exactly what the problem is or what you need.
i don't know what the problem for him, but this code could lead to some unwanted results.
with string replace all you really risk replacing the same char position more then one time.
if "4" means "a" but "a" means "&"
first you will change all "4"s to "a"s, but then, all "a"s to "&"s, wven those that were "4"s and should stay "a"s.
T.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











