BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Coding and development discussion => Topic started by: Nanoflux on March 31, 2007, 12:11:39 pm
-
I'm trying to make a blob with other blobs inside that get their content from a .txt file
Ive tried $this -> bot -> make_blob("Subway", implode("", file("./guides/subway.txt")));
and
"<a href='text://" . implode("", file("./guides/subway.txt")) . "'>Test</a>";
But they just seem to load the text file as the blob name. The complete end section looks like this though:
/*
Makes guides list
*/
function links_list($name)
{
$result="";
$result .= "<font color=CCInfoHeadline><center>Guides</center>";
$result .= "\n";
$result .= "\n";
$result .= "<a href='text://" . implode("", file("./guides/subway.txt")) . "'>Test</a>";
$result .= "\n";
return "I know this " . $this -> bot -> make_blob("knowledge", $result);
}
}
?>
Thanks
-
You can't make blobs inside of blobs, item refs being the exception.
Only way is to make links executing commands that return the inside blobs as results.
-
http://php.net/file_get_contents (http://php.net/file_get_contents) for teh win
Edit: And I think the word you're looking for is "import" not "implode"
-
You can't make blobs inside of blobs, item refs being the exception.
Only way is to make links executing commands that return the inside blobs as results.
Ill have to attempt at that then
thanks for quick replies