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 Profiles. (https://forums.graalonline.com/forums/showthread.php?t=134263525)

Astram 06-10-2011 08:11 PM

Gui Profiles.
 
I can get a gui profile to work! I searched on the forums and found all of these profile things but, none work!
It says
Error: Line 8 in script "-GProfiles", unknown function addcontrol

It is first in weapon order, and it says on line 8

new GuiButtonProfile("Test") {

Help please!! :p

cbk1994 06-10-2011 10:47 PM

It needs to be clientside. Make sure there's no spaces after the //#CLIENTSIDE line.

Entrok 06-11-2011 08:33 AM

Use:
PHP Code:

new GuiButtonCtrl("Test") { 

GuiButtonProfile is used to define what profile to use
PHP Code:

profile GuiBlueButtonProfile

And always remember to put gui's under
PHP Code:

//#CLIENTSIDE 


Astram 06-12-2011 05:14 PM

Quote:

Originally Posted by cbk1994 (Post 1654243)
It needs to be clientside. Make sure there's no spaces after the //#CLIENTSIDE line.

There is no spaces after clientside...
Still wont work

fowlplay4 06-12-2011 05:25 PM

Quote:

Originally Posted by Astram (Post 1654479)
There is no spaces after clientside...
Still wont work

Feel free to post your code rather than having people shoot almost completely in the dark.

Stowen 07-24-2013 03:41 AM

After it is created the first time, and you didnt properly destroy() the window, it will not reload.

Just add this on clientside:

PHP Code:

function onCreated() {
  
GUI_Window_Name.destroy();



cbk1994 07-24-2013 05:26 PM

Quote:

Originally Posted by Stowen (Post 1720978)
After it is created the first time, and you didnt properly destroy() the window, it will not reload.

Just add this on clientside:

PHP Code:

function onCreated() {
  
GUI_Window_Name.destroy();



That wasn't his problem. He wouldn't see anything about addControl in RC unless the code was being executed serverside.

Also you shouldn't destroy the window in onCreated, especially without checking if it even exists. Just set visible = true explicitly when you create a new control if you're worried it may have been closed earlier (or just check if it exists and show it if so, depends on the situation, but you should never just blindly destroy it).

dylan 07-24-2013 06:26 PM

Way to bump a two year old post?


All times are GMT +2. The time now is 12:01 AM.

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