Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Disabling Script Errors on RC (https://forums.graalonline.com/forums/showthread.php?t=72909)

Inverness 03-18-2007 01:07 PM

Disabling Script Errors on RC
 
Ok, in a system I'm currently working on, I need a to call a function whether or not it is actually defined in the object. Now then, using trigger() or scheduleevent() does not suit my needs because both of those don't interrupt the current function which is not what I want so I simply have to call it the normal way. Is there any way to disable the RC messages for this?

Skyld 03-18-2007 04:39 PM

A lot of the time you can probably do:
PHP Code:

if ("functionname" in obj.getfunctions())
{
  
obj.functionname();


... although I am not sure how well it will work when classes are joined to objects like TStaticVars.

Inverness 03-18-2007 11:36 PM

Quote:

Originally Posted by Skyld (Post 1289985)
... although I am not sure how well it will work when classes are joined to objects like TStaticVars.

This is the exact problem, those functions that are joined aren't listed. If there is no alternative I'll just make onCreated necessary for each class of the system where it would name any other multi-class events.

Skyld 03-18-2007 11:37 PM

Quote:

Originally Posted by Inverness (Post 1290192)
This is the exact problem, those functions that are joined aren't listed. If there is no alternative I'll just make onCreated necessary for each class of the system where it would name any other multi-class events.

I would suggest you do this, then.

Inverness 03-22-2007 04:58 AM

Its still too troublesome, I do not like doing it when simply calling the function would normally would be much easier.

Admins 03-24-2007 04:00 PM

You can set this.scriptlogmissingfunctions = false; then calling a missing function of another object will not print messages on the RC

Inverness 03-24-2007 05:32 PM

This is exactly what I needed, much thanks.


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

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