Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-17-2006, 06:09 AM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Conflicting Object Names

PHP Code:

function onCreated()
  {
  
temp.var = this.ani.getSprite(20);
  if ( 
temp.var == 20 )
    echo( 
temp.var SPC "is an object of type" SPC temp.var.objecttype() );
  } 
returns
PHP Code:
20 is an object of type TGraalVar 
To simplify... Because the obj.name is the sprite name (20), it conflicts with the object type (20) named 20. Instead of returning an TGraalAniSprite, it returns TGraalVar.

This DOES work, however:
PHP Code:
this.ani.getsprite20 ).objecttype(); 
meaning as long as you don't save the object as a variable, you could use it without conflict.
Reply With Quote
  #2  
Old 10-17-2006, 01:12 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Ok fixed it in my version. It is now saying it is an object (so assigning to another variable works fine), but is still printing the sprite number when you print just the sprite object
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:51 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.