Andromo - Start Making Apps - Free Signup

Announcement

Collapse
No announcement yet.

SessionVar Action Plugin

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SessionVar Action Plugin



    This plugin is identical to the Setup Factory version. However, I have added SessionVar.GetAll, This is also written in pure Lua.

    (Function help guide.)

    This may prove to be useful for a program where you might integrate a plugin system or something like that.

    This is a type 2 plugin.

    Originally posted by ShadowUK View Post
    SessionVar Action Plugin
    • _at_SessionVar.xml
      • Install Path: Program Files/AutoPlay Media Studio 7.5/Data/Actions/
      • Description: This file defines the actions to use in the Script Editor.
    • Example.apz
      • Description: This file is an example for using the SessionVar Action Plugin.
    • Globals.lua
      • Install Path: Program Files/AutoPlay Media Studio 7.5/Data/Includes/_notification_message.lua
      • Notes: Copy all the contents of this file and put them at the bottom of _notification_messages.lua.
      • Description: This file defines the Lua code.
    Everything can be found here.
    Attached Files

  • #2
    nice work and very useful :yes

    one thing :

    your implemention is different than you referenced

    Tip: You can tell when a session variable is undefined if the string returned is the same as the string passed in.
    if variable is undefined; your function returns nil instead of passed string

    Code:
    function SessionVar.Get(Variable)
    	assert(type(Variable) == "string", "Variable is not type string.");
    	return SessionVar.Stored[Variable] or nil;
    end
    but nil beter than passed string for me
    thanks for sharing it
    amsplugins.com Is Closed.

    Facebook Page

    Comment


    • #3
      Originally posted by reteset View Post
      nice work and very useful :yes

      one thing :

      your implemention is different than you referenced



      if variable is undefined; your function returns nil instead of passed string

      Code:
      function SessionVar.Get(Variable)
      	assert(type(Variable) == "string", "Variable is not type string.");
      	return SessionVar.Stored[Variable] or nil;
      end
      but nil beter than passed string for me
      thanks for sharing it
      Code:
      function SessionVar.Get(Variable)
      	assert(type(Variable) == "string", "Variable is not type string.");
      	return SessionVar.Stored[Variable] or Variable;
      end
      If you want it to return the passed string instead.

      Comment


      • #4
        Seems i missed this thanks bud:yes

        Comment

        Working...
        X