View Single Post
  #6  
Old 06-04-2010, 01:31 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Quote:
Originally Posted by fowlplay4 View Post
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(0temp.fishtype.size()))];

That worked eventually with the function and some playing around. Thanks.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote