void main()
{// Update script for displaying current bombs for Tomcat
    void P1 = getplayerproperty(0, "entity");
    void Icon;

    if(!Icon){
      Icon = loadsprite("data/sprites/bomb.gif");
      setglobalvar("Icon", Icon);
    }

    if (P1){
//      int Bombs = getentityvar(P1, 2);
      int Bombs = getglobalvar("Bomb");

      if(Bombs==NULL()){
        Bombs=30;
      }

      drawstring(330,22,1, Bombs);
      drawsprite(Icon, 350, 16, 2500);
    }
}

void clear(){
    void Icon = getglobalvar("Icon");

    if(Icon) {
      free(Icon);
      setglobalvar("Icon", NULL());
    }
}