join()

From Hack Wars Wiki

Jump to: navigation, search


Information for free function join()
Function join(array array, string glue)
API Attacking, Banking, FTP, Watch, HTTP, Challenges
Description Joins array elements to a string using glue. First parameter is the array, second is the glue (what will go between them).


Watch Script Example

You can use this function to create a sentence for one of your messages, made up of several different strings in an array:

string myMessage[];
 
myMessage[1] = "You were scanned by ";
myMessage[2] = getTargetIP();
myMessage[3] = "....lolol";
 
message("your ip here",join(myMessage[]," "));

If the above code is part in a scan watch, then it will send you a message saying something like
"You were scanned by 123.456.7.890 ....lolol".

Personal tools