Aller au contenu

Photo

GUI Scripting Troubles


  • Veuillez vous connecter pour répondre
30 réponses à ce sujet

#26
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

It's done. I have made a new topic for sharing the code. You can find it here.

I'll leave this one for any future problem I (or anyone, really) may have with GUI scripting.



#27
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

More GUI troubles ahead.

I'm having problems with the UIObject_Misc_ExecuteServerScript function.

In fact, I don't understand what parameters it should have to fire.

if I only put the name of the script within the parenthesis it does not work.



#28
BartjeD

BartjeD
  • Members
  • 249 messages

It would probably help if you gave us an example of what you wish to code because with GUI's half the time the error is previous coding and not the function you're working with.

 

From what I remember you only need to have UIObject_Misc_ExecuteServerScript("gui_scripthere")

The script has to have gui_ as the prefix or it won't run. 

 

You can also attach extra parameters to it: UIObject_Misc_ExecuteServerScript("gui_scripthere", "x", "y")

Which means you can get also get UI variables: UIObject_Misc_ExecuteServerScript("gui_scripthere", local1, local2)


  • Clangeddin86 aime ceci

#29
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

 

The script has to have gui_ as the prefix or it won't run. 

 

 

Yes, that was the problem, now it works. Thanks.


  • BartjeD aime ceci

#30
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Yes, that was the problem, now it works. Thanks.


Hi Clangeddin86,

Page 23 of GUI Tutorial: "(NB: Like all scripts that are fired in the module from a GUI, the script name MUST begin with "gui_" to work.)"

Perhaps I should have made that more obvious in the FAQ at the end.
 
Also, the tutorial does give some reasonable examples of the function you mention. :)

Cheers,
Lance.
 
EDIT: I just discovered the old Vault has now gone completely, and so just had to update my links ... In case you don't have it, here is the link to the GUI Tutorial for you:- http://neverwinterva...oding-beginners

#31
Loki_999

Loki_999
  • Members
  • 430 messages

Very nice. Just shows off some of the things you can do with the GUI if you take the effort to learn.