BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Coding and development discussion => Topic started by: Apexsilverevo8 on March 26, 2009, 07:51:11 am
-
I am trying to have a single line of output into guild channel that includes several bits of information. Something like someone does !online and the bot says:
"There are 10 people online, 3 people in the guest channel and 4 others on notify : Click here to see them all"
Now, all the numbers have already been called out, its just a matter of the bot putting them all in 1 line of text with a link to view them all at the end. How do I do this???
This is what I am trying to modify:
return $countonline[0][0] . " Members Online " . $this -> bot -> core("tools") -> make_blob("Click here to view", $msg);
Thanks in advance!!!
-
The place you have to search in is modules/OnlineDisplay.php, the function online_msg().
There the output is created.
-
thats there it is located, I think I have the positioning, its just the sytax or something cuase when ever I change it, it goes into a reboot loop saying there was a parse error. Here is what I was trying:
return $countonline[0][0] . " Members online ", "Guests online " $count1 , "Others online" $count2 . $this -> bot -> core("tools") -> make_blob("Clocik here to view", $msg);
Count1, count2 etc etc have all been defined earlier in the script. Its just a matter of calling them back up again. Thanks again!!!!!! I think I am soooooo close :)
-
return $countonline[0][0] . " Members online ", "Guests online " $count1 , "Others online" $count2 . $this -> bot -> core("tools") -> make_blob("Clocik here to view", $msg);
The ", " breaks it I think.
Should be:
return $countonline[0][0] . " Members online, Guests online " . $count1 . ", Others online " . $count2 . $this -> bot -> core("tools") -> make_blob("Clocik here to view", $msg);
-
that would break it yes
if ur trying to return the data as an array u need return array();
-
scuse the noobness, what do you mean by array? Does it have to be? lol sorry I am just beginning to modify existing code and not really writing new :) THANKS AGAIN!!!!!!!!!
-
ok it looks like I am trying to call up an array...
" 3 Members online, Guests online Array, Others online Array Click here to view"
is what is spammed... How do I make it work? lol thanks again!
-
Anyone have an idea? Please feel free to PM me :) Thanks again!
-
Quick guess is that you need to replace $count1 with $count1[0][0], same for $count2.