Hi, sorry for my english. I want to make me a custom version of RendomItems which says the name of the item, but when I put this : if($randItem = 360){ $mrandItem = "tranche(s) de melon"; } if($randItem = "6:1"){ $mrandItem = "jeune(s)arbre(s)"; } if($randItem = 265){ $mrandItem = "lingot(s) de fer"; } if($randItem = 352){ $mrandItem = "gâteau(x)"; } if($randItem = 6){ $mrandItem = "jeune(s)arbre(s)"; } if($randItem = "6:2"){ $mrandItem = "jeune(s)arbre(s)"; } if($randItem = 260){ $mrandItem = "pomme(s)"; } if($randItem = 264){ $mrandItem = "diamant(s)"; } if($randItem = 344){ $mrandItem = "oeuf(s)"; } if($randItem = 295){ $mrandItem = "graine(s) de blé"; } if($randItem = 35){ $mrandItem = "laine(s)"; } if($randItem = 12){ $mrandItem = "sable"; } it always says "sable". Without this, work correctly but without saying name of item.
Because you are using the asing opertaor('='). For comparation you have to use the comparison operator('==')
It's not required, but you should put the data values in quotes. I store $randItem as a string, not an integer.
Or, if it is not true, consider: $randItem=(strpos(":",$randItem)===false)?(int) $randItem:$randItem); Note that I might've mixed up needle and haystack.
I thought the first thing to learn when you start coding is to ask the guy who's code you are going to modify and publish in public to boot if he minds? Just old fashioned I guess .... Regards Dec