You can't use 'var' it's one of those undocumented keywords.
Besides why not just do: clientr.fish.(@fishtype[i])++; instead the whole temp.var thing.
I'd also recommend making a function for getting a random fish type, something like this:
PHP Code:
function onCreated() {
temp.fish = getRandomFishType();
echo("You caught a " @ temp.fish @ "!");
}
function getRandomFishType() {
temp.fishtype = {"Whiting","Trout","Bass","Shark","Cod","Cuddlefish","Hardhead"};
return temp.fishtype[int(random(0, temp.fishtype.size()))];
}