- ,'resource',$1, $res) or die $dbh->errstr;
+ ,'resource',$type, $res) or die $dbh->errstr;
+ }
+ if($file =~ m{Security\ Guards .+? "center">(\d+)</td>
+ .+? "center">(\d+)</td>}sx){
+ $addpdata->execute($planet,$tick,$scan->{id}
+ ,'planet','Agents', $1) or die $dbh->errstr;
+ $addpdata->execute($planet,$tick,$scan->{id}
+ ,'planet','Security Guards', $2) or die $dbh->errstr;