View Single Post
  #15  
Old 12-06-2009, 02:06 AM
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 Dnegel View Post
Lol, I know that one.

I guess it will start with
PHP Code:
//#CLIENTSIDE
 
functionTest(); 
If you do not have your function call inside a function block then it will result in unusual behaviour (being called every time an event occurs perhaps, which would get very messy and use a lot of CPU time). Instead you should call your function from specific events (i.e. onCreated being called when the NPC is updated or the script is first loaded):
PHP Code:
//#CLIENTSIDE

function onCreated()
{
  
functionTest();

__________________
Skyld
Reply With Quote