Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-17-2011, 12:14 AM
kingcj kingcj is offline
Registered User
kingcj's Avatar
Join Date: Apr 2006
Location: TN
Posts: 114
kingcj will become famous soon enough
Send a message via MSN to kingcj
Quote:
Originally Posted by MrOmega View Post
Are you putting 'on' before the function name. You need to put that with trigger

Such as

PHP Code:
trigger"foo"""); 
Would call...
PHP Code:
function onFoo() 
Sorry I mis-read your quote. I tried placing on before the function, and I still get the error message.
__________________
Zie

"It is not necessary to change. Survival is not mandatory." - W. Edwards Deming
Reply With Quote
  #2  
Old 02-17-2011, 03:04 AM
kingcj kingcj is offline
Registered User
kingcj's Avatar
Join Date: Apr 2006
Location: TN
Posts: 114
kingcj will become famous soon enough
Send a message via MSN to kingcj
Sorry for like the triple post, but this seems to call the echo just don't know how to update the object now...

PHP Code:
public function door.doorOpen() {
  echo(
"crap");
  
this.hide();
  
sleep(3);
  
this.show();

Also in the SwitchDB I echo temp.door and it returns a 0 in RC Chat
__________________
Zie

"It is not necessary to change. Survival is not mandatory." - W. Edwards Deming

Last edited by kingcj; 02-17-2011 at 03:46 AM.. Reason: New Development
Reply With Quote
  #3  
Old 02-17-2011, 03:57 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
That last post is definitely going in the wrong direction.


One thing I can think of is that the onCreated() of the door or switch is getting called before the database's.

For debugging, echoing an object doesn't really make much sense, try echoing temp.door.type() instead to see if anything is actually there.
Reply With Quote
  #4  
Old 02-17-2011, 04:59 AM
kingcj kingcj is offline
Registered User
kingcj's Avatar
Join Date: Apr 2006
Location: TN
Posts: 114
kingcj will become famous soon enough
Send a message via MSN to kingcj
Quote:
Originally Posted by WhiteDragon View Post
That last post is definitely going in the wrong direction.


One thing I can think of is that the onCreated() of the door or switch is getting called before the database's.

For debugging, echoing an object doesn't really make much sense, try echoing temp.door.type() instead to see if anything is actually there.
Yea Kinda figured that. I tried the temp.door.type() and got nothing in RC. Maybe this should be done a different way? Maybe place everything in one function that connects objects and all with params? I dunno.
__________________
Zie

"It is not necessary to change. Survival is not mandatory." - W. Edwards Deming
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 04:55 AM.


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