1. Adrianus Warmenhoven
    Adrianus Warmenhoven August 21, 2006 at 13:26 . Reply


    I really think the IP as texture is cool. But when I tried it with the IP Number:
    I got division by zero on line 88

    If you could tell me why (as I am not that versed in textures etc), so I can fix that…

    with kind regards,
    Adrianus Warmenhoven

  2. Anonymous
    Anonymous August 21, 2006 at 20:09 . Reply

    Hey Adrianus.. this is easy, this will not work correctly as my code sucks!

    apply this change at line 88:

    if ($tmp==0) $tmp++;
    $c = ((32*$tmp[$index2]-$mindist)/($tmp));

    this should fix it!


  3. Xsoft
    Xsoft November 13, 2006 at 09:32 . Reply

    Thats not correct.

    Better is replace line 88 with this:

    if ($tmp1==0) $tmp1++;
    $c = ((32*$tmp[$index2]-$mindist)/($tmp1));

    ($tmp is used bellow so, it you use same $tmp and not eg. $tmp1, then you rewrite other variable. Yes, it remove div by zero error, but also remove generated background).

    If above fix with $tmp works, then you dont need to use this. I just aply this script for generating my avatar: http://avatar.pocitac.com/example.jpg (dont mind this to you?)

    And if you want to try another IP for generating, use some web anonymizer.

Leave a Reply

Warning: require_once(/home/httpd/vhosts/pixelinvaders.ch/httpdocs/neophob.com/wp-content/themes/fanwood/sidebar-after-content.php): failed to open stream: Permission denied in /home/httpd/vhosts/pixelinvaders.ch/httpdocs/neophob.com/wp-includes/template.php on line 501 Fatal error: require_once(): Failed opening required '/home/httpd/vhosts/pixelinvaders.ch/httpdocs/neophob.com/wp-content/themes/fanwood/sidebar-after-content.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/httpd/vhosts/pixelinvaders.ch/httpdocs/neophob.com/wp-includes/template.php on line 501