About random command, and some string functions.
Posted: 2005-01-09 20:22:50
Hello ! Long time i dont brother here =)
Well. Iam with 2 problems:
1-When i use a random command inside a loop... the randomered give the same value...
Exemple:
if the first time it return "13", the another 9 times it will return "13" too.
How i can solve it ?
--------------------------------
2- Whats the string functions that injection uses ?
I need to do something like that:
String: "Vendor Joe: Hello, what u need ?"
a: Take only the text before the " : " and after that remove the "vendor" title.
b: The string after " : " is the question that can change.
c: give the answer based in the question: "Hello Joe, i need to buy something"
in PHP i can use the functions "left" , "right" , "string pos" to do that. But how i can do that here ?
Well. Iam with 2 problems:
1-When i use a random command inside a loop... the randomered give the same value...
Exemple:
Code: Select all
var temp
for temp=1 to 10
uo.print(str( uo.random(20) ) )
next
if the first time it return "13", the another 9 times it will return "13" too.
How i can solve it ?
--------------------------------
2- Whats the string functions that injection uses ?
I need to do something like that:
String: "Vendor Joe: Hello, what u need ?"
a: Take only the text before the " : " and after that remove the "vendor" title.
b: The string after " : " is the question that can change.
c: give the answer based in the question: "Hello Joe, i need to buy something"
in PHP i can use the functions "left" , "right" , "string pos" to do that. But how i can do that here ?