Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-06-2007, 01:06 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Player classes

I am having trouble with player classes. I have asked many people, but they can't seem to find out whats wrong.
Heres my test scripts:

class 'playert1':
PHP Code:
//#CLIENTSIDE
function Test()
{
  
this.chat "test";

weapon 'Test':
PHP Code:
//#CLIENTSIDE
function onCreated()
  
player.join("playert1");

function 
onWeaponFired()
  
player.Test(); 
Now, alot of people told me not to join classes clientside, but I have tried joining the class serverside, when the player logs on, etc.
And it still didnt work. The problem is the class isnt being joined...
And idk why not, when I echo player.joinedclasses it only echoes startgui,
So, i'm not sure why the class isnt being joined. Any help?
Reply With Quote
  #2  
Old 11-06-2007, 08:30 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
use

HTML Code:
this.join("playert1");
Make it serverside also.
__________________
Reply With Quote
  #3  
Old 11-06-2007, 08:46 PM
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 xAndrewx View Post
use

HTML Code:
this.join("playert1");
Make it serverside also.
Not quite.
PHP Code:
player.join("classname"); 
... is correct.

Your functions need to be public though I think, and yeah, they tend to be so much more useful on the serverside.
__________________
Skyld
Reply With Quote
  #4  
Old 11-06-2007, 08:47 PM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Well, the function in the class is public, I just didnt add that cause....idk why. sorry
I join the class when th eplayer logs in, I echo joined classes, nothing....
So, idk why the class istn joining.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:11 AM.


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