he cambiado todo  asi:
  Código PHP:
    <?
include ("cabecera.php");
echo "<h1> Meteorito gigante xd.</h1>";
if (isset($_SESSION['s_username'])) {
$inventariqueri = mysql_query("SELECT inv1,inv2,inv3,inv4,inv5 FROM inventario WHERE user='$usuarioo'");
$rowc = mysql_fetch_array($inventariqueri);
$inv1 = $rowc['inv1'];
$inv2 = $rowc['inv2'];
$inv3 = $rowc['inv3'];
$inv4 = $rowc['inv4'];
$inv5 = $rowc['inv5'];
 
$otherqueri = mysql_query("SELECT id FROM objetos WHERE id='$inv1'");
$rowc = mysql_fetch_array($otherqueri);
$nombredel = $rowc['nombre'];
 
if (empty($inv1)) {
$vacio = 1;
$campo = inv1;
}elseif (empty($inv2)){
$vacio = 1;
$campo = inv2;
}elseif (empty($inv3)){ 
$vacio = 1;
$campo = inv3;
}elseif (empty($inv4)){ 
$vacio = 1;
$campo = inv4;
}elseif (empty($inv5)){ 
$vacio = 1;
$campo = inv5;
}else{
$vacio = 0;
} 
$valor=rand(1,8);
if ($valor<=3 && $vacio==1){
$querymm="update inventario set '$campo'='$valor' where user='".$_SESSION["s_username"]."'";
mysql_query($querymm) or die(mysql_error());
$otherqueri = mysql_query("SELECT nombre FROM objetos WHERE id='$valor'");
$rowc = mysql_fetch_array($otherqueri);
$nombredel = $rowc['nombre'];
echo "<p>felicidades! has encontrado:".$nombredel." y se te ha agreguado a tu inventario</p>";
}
if ($valor>=4){
echo "Luego de una gran busqueda, no has encontrado nada. vuelve luego xd";
}elseif ($vacio==0){
echo "tu inventario esta lleno, elimina algunas cosas xd";
}
}else{
echo "debes iniciar sesion xd";
}
include ("pie.php");
?>    
  pero el problema haora es con esta linea  
 Código PHP:
    $querymm="update inventario set '$campo'='$valor' where user='".$_SESSION["s_username"]."'";
mysql_query($querymm) or die(mysql_error()); 
    
  que me da el siguiente error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''inv5'='1' where user='b'' at line 1