ads.lua not available

I want to put ads in my game. I have starter edition of latest corona build. I cant put ads because i dont have ads.lua plugin. The simulator gives me the following error :

 

Runtime error

        F:\Android app development\The Red Airship\main.lua:22: module ‘ads’ not

 found:resource (ads.lu) does not exist in archive

        no field package.preload[‘ads’]

        no file ‘F:\Android app development\The Red Airship\ads.lua’

        no file 'G:\Program FRuntime error: F:\Android app development\The Red A

irship\main.lua:22: module ‘ads’ not found:resource (ads.lu) does not exist in a

rchive

        no field package.preload[‘ads’]

        no file ‘F:\Android app development\The Red Airship\ads.lua’

        no file 'G:\Program Files\Ansca\Coro

Please help

Some 1 please help…Its really frustrating 

Please help corona guys…i am using Corona’s latest build 2014.2189 on my windows PC…I dont understand why i dont have ads.lua file in my corona

can anyone please help me in solving this issue…please

Hello @716sasuke,

Can you please post your code where you attempt to “require()” the ads library? Please surround it with lua tags for clarity:

[lua] (your code) [/lua]

Also, the ads library is part of the Corona core. You won’t be able to locate/open this directly.

Thanks,

Brent

my main.lua file 



display.setStatusBar( display.HiddenStatusBar )

screenW, screenH, halfW, halfH = display.contentWidth, display.contentHeight, display.contentWidth*0.5, display.contentHeight*0.5

local storyboard = require “storyboard”

local ads = require( “ads” )

local function adListener( event )

   if ( event.isError ) then

        print(“Failed to receive an ad”)

 end

end

ads.init( “inneractive”, “CrosshairStudios_BattleAirship_Android”, adListener )

storyboard.gotoScene ( “menu”, { effect = “fade”} )

my build.settings file :

[lua]

settings =

{

   orientation =

   {

      default = “portrait”,

      supported = { “portrait” }

   },

   android =

   {

      usesPermissions =

      {

         “android.permission.INTERNET”,

         “android.permission.ACCESS_NETWORK_STATE”,

         “android.permission.READ_PHONE_STATE”,

      },

   },

   iphone =

   {

      plist =

      {

         CFBundleIconFile = “Icon.png”,

         CFBundleIconFiles =

         {

            “Icon.png”, 

            “Icon@2x.png”, 

            “Icon-72.png”, 

         },

      },

   },

   plugins =

   {

      – key is the name passed to Lua’s ‘require()’

      [“CoronaProvider.ads.inneractive”] =

      {

         – required

         publisherId = “com.inner-active”,

      },

   },

}

[/lua]

I dont think there is any error in my code…my Corona just dont have ads library…i am using Corona Starter package latest build 2014.2189 on my Windows XP …I can run my  games without ads…But when i use local ads = require( “ads” )  i get error… Please help corona people…

Hello @716sasuke,

Please be patient and let us evaluate your messages before you continue responding to your own threads. This is the best approach to solve an issue. Typically, Rob, myself, or another community member will respond within 24 hours, so you should await these responses before posting more messages in the same thread.

Best regards,

Brent

Ok.Brent

i get the same error while loading the sample code provided by corona

Ads is built into the core.  The message you are getting should not be even possible.  The only thing I can think of is that you have a corrupt install of Corona SDK.  Since you’re on Windows, I would go into Control Panel and remove it.  Then download the latest version and install it and try it again.

Rob

k i will uninstall and download it again…and then post the results

Thanks @ Rob,

I uninstalled my corona and downloaded it again.My previous download was corrupt i guess. Re-installing fixed my issue.Thanks once again.

Thanks Rob…I uninstalled the program and re downloaded the latest build. I got my ads working. Thanks once again

Glad that worked.  It’s about the only thing that made sense, but today having a corrupt install should be a very rare thing.  10 years ago, there was a high enough fail rate that would be a common thing.

Rob

Some 1 please help…Its really frustrating 

Please help corona guys…i am using Corona’s latest build 2014.2189 on my windows PC…I dont understand why i dont have ads.lua file in my corona

can anyone please help me in solving this issue…please

Hello @716sasuke,

Can you please post your code where you attempt to “require()” the ads library? Please surround it with lua tags for clarity:

[lua] (your code) [/lua]

Also, the ads library is part of the Corona core. You won’t be able to locate/open this directly.

Thanks,

Brent