SphereCommunity

Full Version: How do I script the closealldialogs function?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How i do that?

I've seen many threats containing this function "closealldialogs".


That would be very, very helpfull. Sorry :/ NB here.
(09-21-2018 11:56 AM)kduzera Wrote: [ -> ]How i do that?

I've seen many threats containing this function "closealldialogs".


That would be very, very helpfull. Sorry :/ NB here.

Code:
[function closealldialogs]
if (<memoryfindtype.memory_gumprecord>)
forcharmemorytype memory_gumprecord
trysrc <cont> src.dialogclose <tag0.dialog_name> <argn2>
endfor
endif
THANNNKKK UU BRO!!
The latest sphere shows:
PHP Code:
09:06:ERROR:(function.scp,55)Undefined symbol 'memory_gumprecord' ['memory_gumprecord'

And why actually have this feature? It is built into the original client. Just type the command from Options on the key.
'memory_gumprecord' memory item was removed in 2007 (yes, 11 years ago), it got replaced by DIALOGLIST function

so instead check for <MEMORYFINDTYPE.memory_gumprecord> you must use <DIALOGLIST.x>

Code:
[FUNCTION CloseAllDialogs]
IF (<DIALOGLIST.COUNT>)
   FOR <eval <DIALOGLIST.COUNT> - 1> 0
      DIALOGCLOSE <DIALOGLIST.<LOCAL._FOR>.ID>
   ENDFOR
ENDIF
Reference URL's