Development > Generic custom modules

Colorize Text

<< < (2/3) > >>

fowlskins:
yeah that probaly would help wouldnt it  :D

ill reinstall it and see what the error message actualy is

fowlskins:
Fatal error: Call to undefined function mb_substr() in C:\bebot\custom\modules\c
olorize.php on line 38
 
ok thats the error message i get

Kyr:
Change line 38 to:

--- Code: ---$COLORIZED .= "<font color=\"".$COLOR."\">".substr($name, $i, 1)."</font>";
--- End code ---

and change line 25 to:

--- Code: ---return $this -> get_colorize($name, substr($msg, 9));
--- End code ---

fowlskins:
thankyou kyr thats got it working   ;D
does it always randomly color each letter of the word ??
in my head it would randomly do a whole sentance one color
but thats just me being picky its not a big deal

cheers for your help

Kaitoujeanne:
I copied the code into new a php document and called it colorize.php and added into the \custom\modules and restarted the bot and it shows it loaded and it does show up in the !help and !commands list but when I type !colorize test into the game-chat it doesn't color it or do anything, it just says exactly what I type.
Am i missing something? I did change lines 25 + 38 so it doesn't crash the bot since it did at first but now it doesn't want to do anything.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version