Aller au contenu

Photo

InputBox Problem


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

#1
1Ombra1

1Ombra1
  • Members
  • 24 messages
Hi,

I created a DM Wand used to insert a replacement for Console Commands (or at least some of them) into a PW with a Stand Alone Server.
I used an Input Box with DisplayInputBox function.

The Box Pops Up and I can insert my command string, but when I click on the OK button nothing happen, and this is not my first script with an Input Box GUI. Two days ago the GUI worked fine, I have screens, and now it is dead.

The line who calls the Input Box is:

DisplayInputBox(oDM,0,MSG_COMMAND,"gui_consoleok","gui_consoleno",TRUE,"",0,"Esegui",0,"Annulla");

gui_consoleok is teh Call back Script for OK Button and gui_consoleno is for Cancel Button, the name uses the GUI convention, no control messages are delivered to DM by clicking the buttons (control messages are sent by SendMessageToAllDMs function, one in each Call Back Scripts to see by DMs if they run, the Wand is usable only by DMs).

Any Ideas.

#2
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
it has a run time compile error, something in a library it uses changed. ( try compiling the gui_* script where it is on the server and see if it throws an error, almost certain it does, remember it needs ncs AND all nss files related to the main nss file to run time compile )

I would use the new chat event, which that widget is trying to fake out.

#3
1Ombra1

1Ombra1
  • Members
  • 24 messages
No compiler errors. The only thing I changed into a include file is a switch statement, I added some cases, I also used if-else to test in a different way.
And of course I have both .nss and .ncs (.ncs are the only files needed to run).

#4
dethia

dethia
  • Members
  • 146 messages
I had done something similar where a wand would excute a script typed into the input box. Perhaps you can link your gui script so i can tell you what may be wrong (based on the changes).

Also put a debug message in them (SendMessageToPC(GetFirstPC(), "We're in the gui callback script"); ) or anything similar to make sure the script is firing when you hit the ok button.

#5
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
i would say that i am pretty certain that you have declared a variable in your case statement or something else, that is just a guess. Regardless that is very likely the area since you just changed it.

Note that nss are required to run gui scripts, and they are known to do this, and if you have both ncs and nss then it's certainly a compiling error which happens in game. It has to do that to figure out the parameters for the script so they make it do a quick compile first time it's used, you might even notice the game pausing a bit when it does it.

#6
1Ombra1

1Ombra1
  • Members
  • 24 messages
I solved it. I switched two #include and all was fine... Bugsidian I'm Loving It.