Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   Join Class Clientside (https://forums.graalonline.com/forums/showthread.php?t=66349)

KuJi 05-31-2006 04:48 AM

Join Class Clientside
 
//#CLIENTSIDE
function onCreated() {
this.guild = "Test";
join("guildcomp");
}


How come in the class on clientside, if I am to do
//#CLIENTSIDE
function onCreated()
player.chat = this.guild;

Nothing happens..? I can't have clientside classes w/ flags set? I am pretty sure CheeToS said you could.

Rick 05-31-2006 05:05 AM

Because 'guild' is a predefined (err... wrong word but you should get what I mean) variable and shouldn't be used.

Warcaptain 05-31-2006 07:08 AM

Also, if you are going to have a //#CLIENTSIDE in the class, you should do:

join("classname");
//#CLIENTSIDE
scriptstuffhere

KuJi 05-31-2006 01:09 PM

I've had CheeToS come on before and try what Warcaptain has said w/ Totally different numbers a while back

Admins 05-31-2006 08:07 PM

The class first needs to be downloaded, so the onCreated function of guildcomp will probably never be called. It should work though when a second object is joining guildcomp, since then the class is already loaded.

Most of the time you don't need to join on clientside though, it's more safe to join on serverside since the server will make sure that you have the class before telling the client that the object joined the new class. Clientside-joining is really only needed in combination with TStaticVar.


All times are GMT +2. The time now is 02:00 PM.

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