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 05-13-2008, 10:26 AM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
Another problem... "join"

Ok, this is an extremely annoying problem. In a level I have:
PHP Code:
//#CLIENTSIDE
if(created||playerenters){
  
join lightlamp;

If you update the level the lightlamp class works but if you reconnect and dont update level manually, the script acts really weird. Pain in the ass.
Why would it do this?
Reply With Quote
  #2  
Old 05-13-2008, 10:32 AM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Try doing

PHP Code:
//#CLIENTSIDE
join("lightlamp"); 
That's assuming your lightlamp class already has an onCreated/onPlayerenters event.
__________________

Reply With Quote
  #3  
Old 05-13-2008, 02:03 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
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
More like:

PHP Code:
join("lightlamp");
//#CLIENTSIDE
function onCreated()
{

Classes should always be joined serversided.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #4  
Old 05-13-2008, 02:30 PM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Quote:
Originally Posted by xXziroXx View Post
More like:

PHP Code:
join("lightlamp");
//#CLIENTSIDE
function onCreated()
{

Classes should always be joined serversided.
Ah yes :P
__________________

Reply With Quote
  #5  
Old 05-13-2008, 02:48 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 xXziroXx View Post
Classes should always be joined serversided.
Usually, but not always. There are some classes that wouldn't work when joined serverside ;o
Reply With Quote
  #6  
Old 05-13-2008, 02:58 PM
Dan Dan is offline
Daniel
Join Date: Oct 2007
Posts: 383
Dan is an unknown quantity at this point
Send a message via MSN to Dan
Quote:
Originally Posted by Crow View Post
There are some classes that wouldn't work when joined serverside ;o
Like?
__________________
Reply With Quote
  #7  
Old 05-13-2008, 03:13 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 Dan View Post
Like?
That completely clientsided textbox class I made sometime.
Don't ask me why it won't work joined serverside, it just doesn't.
Reply With Quote
  #8  
Old 05-13-2008, 03:39 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
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
Quote:
Originally Posted by Crow View Post
That completely clientsided textbox class I made sometime.
Don't ask me why it won't work joined serverside, it just doesn't.
Sounds like you forgott to add //#CLIENTSIDE in your class. All classes SHOULD be joined serverside whenever possible, period.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #9  
Old 05-13-2008, 03:58 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 xXziroXx View Post
Sounds like you forgott to add //#CLIENTSIDE in your class. All classes SHOULD be joined serverside whenever possible, period.
It is inside the class, it doesnt work when joined serverside, it works super perfectly when joined clientside, MOAR PERIOD.
Reply With Quote
  #10  
Old 05-13-2008, 04:00 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
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
Quote:
Originally Posted by Crow View Post
It is inside the class, it doesnt work when joined serverside, it works super perfectly when joined clientside, MOAR PERIOD.
Did you check if you forgot to add //#CLIENTSIDE?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #11  
Old 05-13-2008, 04:06 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 xXziroXx View Post
Did you check if you forgot to add //#CLIENTSIDE?
Quote:
Originally Posted by Crow View Post
It is inside the class
WHITE.
Reply With Quote
  #12  
Old 05-13-2008, 04:54 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
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
Quote:
Originally Posted by Crow View Post
WHITE.
l2read @ me?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #13  
Old 05-13-2008, 06:56 PM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
Great! Thanks so much everyone. All I had to do was serverside the join() command. The different effects of serversided and clientsided things are so frustrating.
Reply With Quote
  #14  
Old 05-13-2008, 06:58 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
That's not true Ziro. Here's a perfect case:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.myobj = new TStaticVar();
  
this.myobj.join("myclass");

You wouldn't be able to do that serverside as your object doesn't exist over there .
__________________
Do it with a DON!
Reply With Quote
  #15  
Old 05-13-2008, 07:42 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
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
Quote:
Originally Posted by zokemon View Post
That's not true Ziro. Here's a perfect case:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.myobj = new TStaticVar();
  
this.myobj.join("myclass");

You wouldn't be able to do that serverside as your object doesn't exist over there .
I did say MOST of the time.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #16  
Old 05-13-2008, 08:59 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 xXziroXx View Post
I did say MOST of the time.
Oh, when I was reading the thread, it seemed to have skipped about 4 posts when I hit page down, haha.
__________________
Do it with a DON!
Reply With Quote
  #17  
Old 05-13-2008, 10:05 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Not to flame Ziro, but just wanted to point out that you also need to join classes to the player on serverside for serverside functions, and in a system weapon on clientside as well for client functions to work.
__________________
Reply With Quote
  #18  
Old 05-14-2008, 12:35 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by xXziroXx View Post
All classes SHOULD be joined serverside whenever possible, period.
PHP Code:
//#CLIENTSIDE
function onPlayerEnters() {
  if (
player.ismalethis.join("stuff_for_guys");
  else 
this.join("stuff_for_girls");

Here is my simple local NPC which could join classes serverside, but would make my work much more tedious.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #19  
Old 05-14-2008, 09:33 AM
Dan Dan is offline
Daniel
Join Date: Oct 2007
Posts: 383
Dan is an unknown quantity at this point
Send a message via MSN to Dan
Quote:
Originally Posted by zokemon View Post
That's not true Ziro. Here's a perfect case:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.myobj = new TStaticVar();
  
this.myobj.join("myclass");

You wouldn't be able to do that serverside as your object doesn't exist over there .
I did this serverside and it works fine?

PHP Code:
case "accessClass": {
  
temp.access = new TStaticVar();
  
temp.access.join(params[1]);
  
temp.access.(@ params[2])(@ params[3]);
  
temp.access.destroy();
  return 
true;

Or isn't that what you ment?
__________________
Reply With Quote
  #20  
Old 05-14-2008, 09:57 AM
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 Dan View Post
I did this serverside and it works fine?

PHP Code:
case "accessClass": {
  
temp.access = new TStaticVar();
  
temp.access.join(params[1]);
  
temp.access.(@ params[2])(@ params[3]);
  
temp.access.destroy();
  return 
true;

Or isn't that what you ment?
He meant that if he had a TStaticVar() on Clientside you couldn't join that on Serverside. Or it would make no sense and wouldn't do anything at least.
Reply With Quote
  #21  
Old 05-14-2008, 10:41 AM
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 Dan View Post
I did this serverside and it works fine?
Of course it would WORK serverside, but not in the intended purpose as the object created on the serverside wouldn't be accessible clientside which is what we are talking about here.
__________________
Do it with a DON!
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 11:35 PM.


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