"attempt to call 'Nill' value in function 'require'."

Hey,

I’m having an issue with my code.

 

Here’s my code I’m now getting an error which states:  '0 attempt to call nill value in function require main.lua 9

 

local pasteboard = require( "plugin.pasteboard" ) txtstring = "Test text string" pasteboard.copy("string",txtstring) Here are my build settings: -- -- For more information on build.settings, see the Project Build Settings guide at: -- https://docs.coronalabs.com/guide/distribution/buildSettings -- settings = { orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "portrait", supported = { "portrait", }, }, -- -- Android section -- android = { usesPermissions = { "android.permission.INTERNET", }, }, settings = {     plugins =     {         ["plugin.pasteboard"] =         {             publisherId = "com.coronalabs",         },     }, } -- -- iOS section -- iphone = { xcassets = "Images.xcassets", plist = { UIStatusBarHidden = false, UILaunchStoryboardName = "LaunchScreen", }, }, -- -- Plugins section -- plugins = { }, -- -- Project section -- excludeFiles = { -- Exclude unnecessary files for each platform all = { "Icon.png", "Icon-\*dpi.png", "Images.xcassets", }, android = { "LaunchScreen.storyboardc", }, }, }

You need to make a reference for the plugin in your build.settings file

[lua]

settings =

{

    plugins =

    {

        [“plugin.pasteboard”] =

        {

            publisherId = “com.coronalabs”,

        },

    },

}

[/lua]

Wait, I see you did that but that you have two settings and two plugins in your build. . .I’ll take another look a little later

OK, you had

settings --> settings --> plugins and another plugins that was blank

instead of

settings --> plugins

I took away the extra settings and the extra plugins, try this:

[lua]

settings =

{

    orientation =

    {

        – Supported values for orientation:

        – portrait, portraitUpsideDown, landscapeLeft, landscapeRight

        default = “portrait”,

        supported = { “portrait”, },

    },

    –

    – Android section

    –

    android =

    {

        usesPermissions =

        {

        “android.permission.INTERNET”,

        },

    },

    –

    – Plugins section

    –

    plugins =

    {

        [“plugin.pasteboard”] =

        {

            publisherId = “com.coronalabs”,

        },

    },

    –

    – iOS section

    –

    iphone =

    {

        xcassets = “Images.xcassets”,

        plist =

        {

        UIStatusBarHidden = false,

        UILaunchStoryboardName = “LaunchScreen”,

        },

    },

    –

    – Project section

    –

    excludeFiles =

    {

    – Exclude unnecessary files for each platform

        all = { “Icon.png”, “Icon-*dpi.png”, “Images.xcassets”, },

        android = { “LaunchScreen.storyboardc”, },

    },

}

[/lua]