The Daily Click ::. Forums ::. Klik Coding Help ::. Jamagic - How do i check if a surface exist?
 

Post Reply  Post Oekaki 
 

Posted By Message

Dogzer



Registered
  07/02/2011
Points
  1029
7th April, 2004 at 18:03:29 -

how do i check if a surface handle returns something besides a surface? does it returns 0.. or null? how do i check?

 
n/a

Kramy



Registered
  08/06/2002
Points
  1888
7th April, 2004 at 20:19:56 -

Phizzy, you're an idiot. You must use a dull stick or you'll end up shifting the bits in the returned value.

 
Kramy

Dogzer



Registered
  07/02/2011
Points
  1029
7th April, 2004 at 20:32:07 -

you guys have no respect for my Coolness

 
n/a

Kramy



Registered
  08/06/2002
Points
  1888
7th April, 2004 at 22:01:14 -

Coolness? What Coolness?

If(!IsNumber(mySurface))
{
do something;
}

 
Kramy

Long John Kickbag



Registered
  26/08/2002
Points
  148
8th April, 2004 at 08:38:34 -

If this is a built in function then it'll return 0. Use:

If(mySurface == 0)
{
//bleh
}

Should be faster than IsNumber, quicker to interpret and there's no function call.

 
Resize! - www.clicksplat.com/comparison.html

Dogzer



Registered
  07/02/2011
Points
  1029
8th April, 2004 at 13:58:04 -

the program.isnumber and program.isobject are the answers i needed. Thanks 2 Kramy, thanks Erik too.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click