Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   GUI Serverside Problems. (https://forums.graalonline.com/forums/showthread.php?t=134259356)

xMane 05-30-2010 07:54 PM

GUI Serverside Problems.
 
xMane/Tag :
NPC Code:
function onActionServerSide()
{
if ( params[ 0 ] == "open" )
{
Biz_PlayerControlWindow.show();
}
}
//GUI DOWN HERE \/


-Biz/Main :
NPC Code:
function Biz_PlayerControl.onAction() {
triggerServer( "gui", "xMane/Tag", "open" );
}


i get this error
Quote:

Function Biz_PlayerControlWindow.show not found at line 5 in script of xMane/Tag (in level sin_world-a8.nw at pos (68, 20))
How do i fix this?

DustyPorViva 05-30-2010 07:56 PM

You can't create GUI's on the serverside. Clientside is meant to handle all the graphical aspects of the game.

You're going to have to create the GUI's on the clientside and just send what data you need from the serverside over.

xMane 05-30-2010 08:22 PM

lol ok :(

fowlplay4 05-30-2010 08:52 PM

If the GUI object is created, instead of using a trigger you can just use: Biz_PlayerControlWindow.show();

or use public functions. I.e:

WeaponA:

PHP Code:

//#CLIENTSIDE
public function tellJoke() {
  
player.chat "What's the deal with airline food?";


WeaponB:

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
// Find Weapon Way
  
findweapon("WeaponA").tellJoke();
  
// Reference Way
  
(@"WeaponA").tellJoke();



xMane 05-30-2010 08:58 PM

:D thanks <3


All times are GMT +2. The time now is 02:27 AM.

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