View Single Post
  #1  
Old 12-13-2009, 06:30 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
Finding the type of variable

Im trying to use this code to decide if params[1] is a number, string, or array. This is the only way I saw to do it. Its deciding if params[1] is an array or number. The params[1] is a this.variabe that could be either a string or array, and am trying to seperate the two in the actionserverside. help.

PHP Code:
  if (params[0] == "getReply")
  {
    
temp.idtype params[1];
    if (
idtype.type() == 1)
      
triggerClient("weapon"this.name"getReply"this.db.(@params[2]).infoparams[1]);
    if (
idtype.type() == 3)
    {
      if (!(
params[3]) && !(params[4]))
        
triggerClient("weapon"this.name"getReply2"this.db.(@params[2][0]).infoparams[1]);
      if (!(
params[3]) && params[4])
        
triggerClient("weapon"this.name"getReply3"this.db.(@params[2][1]).infoparams[1]);
    }
  } 
__________________
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