• Studio

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • CREATE

    Scripting

    Lua

    Attributes

    Edit

    Types

    The attribute Type is used to specify the type of script you are creating. This attribute is optional, but it is recommended to include it for clarity and consistency. The Type attribute can be set to Client, Server, Module, ClientAndServer, or UI.

    Here is an example of defining the script type in Lua:

    Client Type Script

    --!Type(Client)
    

    Server Type Script

    --!Type(Server)
    

    Module Type Script

    --!Type(Module)
    

    ClientAndServer Type Script

    --!Type(ClientAndServer)
    

    UI Type Script

    --!Type(UI)
    

    Conclusion

    Whether to include the Type attribute in your script depends on the context and purpose of the script. By specifying the script type, you can ensure that your script is correctly categorized and used in the intended context. This attribute helps maintain consistency and clarity in your project, making it easier to manage and organize your scripts effectively.

    Updated 17 days ago

    PocketWorlds Icon

    © 2024 Pocket Worlds. All rights reserved.