Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 05-14-2007, 06:32 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
The next Graal version will have hasfunction() as well, until then use getfunctions() like Skyld said
Yay!
__________________
Reply With Quote
  #17  
Old 05-14-2007, 06:45 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Oh, so we need to make our own system NPC to check if the functions exist? fun... o_o
Reply With Quote
  #18  
Old 05-14-2007, 07:08 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Chandler View Post
Oh, so we need to make our own system NPC to check if the functions exist? fun... o_o
Why on Earth would you make a system NPC just to perform "magicFunction".lower() in this.getfunctions()?
__________________
Skyld
Reply With Quote
  #19  
Old 05-14-2007, 07:32 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Because functions can be edited, isn't that why Stefan created this...?
Reply With Quote
  #20  
Old 05-14-2007, 07:36 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Chandler View Post
Because functions can be edited, isn't that why Stefan created this...?
I'm confused, and I am not sure where you are going with that.

if ("magicFunction".lower() in this.getfunctions()) tells you if the function magicFunction() has been defined somewhere on the current object (normally the script/NPC). Change the this. to some other object to check if the function is defined in that object instead.

It's only one line, and it certainly does not need a system NPC creating to use it.
__________________
Skyld
Reply With Quote
  #21  
Old 05-14-2007, 07:40 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
However, we need to add this to each of our system npcs.
Reply With Quote
  #22  
Old 05-14-2007, 07:42 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Chandler View Post
However, we need to add this to each of our system.
What, why?
__________________
Skyld
Reply With Quote
  #23  
Old 05-14-2007, 07:46 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
To check if the functions actually exist.
If people can edit function names via memory editing, we are checking to see if they exist.
Correct me if I have perceived this thread totally wrong...
Reply With Quote
  #24  
Old 05-14-2007, 07:48 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Chandler View Post
To check if the functions actually exist.
If people can edit function names via memory editing, we are checking to see if they exist.
Correct me if I have perceived this thread totally wrong...
There is no real reason to add this to every function call, because the function won't get called anyway if someone has "edited" it by memory editing.

The main use for it I guess is checking if functions are present from joined classes or so.
__________________
Skyld
Reply With Quote
  #25  
Old 05-14-2007, 07:48 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by Chandler View Post
To check if the functions actually exist.
If people can edit function names via memory editing, we are checking to see if they exist.
Correct me if I have perceived this thread totally wrong...
Please do correct me if I'm wrong, but I've always been told EVERYTHING clientsided can be edited with memory editing - not just function names.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #26  
Old 05-14-2007, 07:50 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Skyld, I see. object.isinclass isn't good enough

xXZiroXx, kind of, not all.
Reply With Quote
  #27  
Old 05-14-2007, 08:03 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Chandler View Post
Skyld, I see. object.isinclass isn't good enough

xXZiroXx, kind of, not all.
Clientside = in memory = editable, some things are just harder.
__________________
Reply With Quote
  #28  
Old 05-14-2007, 09:14 PM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Quote:
Originally Posted by sam_is_me View Post
What the heck is magicFunction()?
If you have something stupid to say.. don't say it.

--

Anyway:

Changing onwall/2 makes it so you can walk on walls because it will return false ( no longer exists )

Would be cool if non-existing functions returned like -1.
__________________
- Zidane / Zidaya
Reply With Quote
  #29  
Old 05-26-2007, 12:23 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by sam_is_me View Post
What the heck is magicFunction()?
Quote:
Originally Posted by Skyld View Post
PHP Code:
function magicFunction()
{
  echo(
"Hello!");

In that example, it was that!
__________________
Do it with a DON!
Reply With Quote
  #30  
Old 06-18-2007, 07:11 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
TGraalVar.hasFunction(functionname);

Stefan has granted your wish, and screwed up getVarNames() in the process.
__________________
Reply With Quote
Reply


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 05:15 PM.


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