Search Unity

[SOLVED]Default Identificator are not Allowed

Discussion in 'Unity Ads & User Acquisition' started by RobotReebot, Nov 19, 2014.

  1. RobotReebot

    RobotReebot

    Joined:
    Jul 31, 2014
    Posts:
    13
    Hi,
    I am trying to implement Unity Ads for my game, but when i try to compile scripts of the package, i get this error:



    It says "The default identificator of parametres are not alloweed" (i am not sure of translation beacouse English is not my mother language")

    Hope you can help me
     
  2. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    Do you get the same errors when you attempt to run you game in Unity?
     
    RobotReebot likes this.
  3. RobotReebot

    RobotReebot

    Joined:
    Jul 31, 2014
    Posts:
    13
    No, i don't get it, but ads seems not working.

    I want two ads in the game, one when you open the game, and one when you close it.

    If I close the game (Esc) sometimes i see ads working, sometimes no.
    If I open the game, Ads is never showed, I see in the debugger that is ready, but i don't see anything on Game.

    I hope this helps


    EDIT: in my phone, things seem to work
     
    Last edited: Nov 20, 2014
  4. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    Keep in mind, it takes a few seconds for Unity Ads to initialize. You want to give Unity Ads enough to finish initializing before calling the Show() method.

    You can use yield statements in the Start() method for example to wait until the next frame before checking isInitialized and isReady. You can loop over these until both are true, or until you've waited for a certain amount of time. Having a timeout is important in case network connectivity is an issue. If Unity Ads fails to initialize, you want to at least still allow users to progress into gameplay.

    You mentioned you were able to get things working properly on your phone. Let me know if you still need help with this issue and at what point you're still experiencing an issue.
     
    RobotReebot likes this.
  5. RobotReebot

    RobotReebot

    Joined:
    Jul 31, 2014
    Posts:
    13
    Excuse me, i need to inizialize the ads every time i want to show it or I just need to call it one time?

    And, if i want to test all the ads offered, but i still don't have publish my game in the play store, could i try something?


    I am sorry if my question are obviously, but I am new in Unity and i want to learn :)
     
  6. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    No worries :) That's what I'm here for.

    You just need to call the Initialize() method once, when your game starts. You can test your ad implementation without having your game published. If you pass true as a second parameter to the Initialize() method, test mode will be enabled, allowing you to view test ads on your device.

    I've written a helper script that handles most of the integration process for you, and manages whether test mode is enabled by checking if Development Build is enabled in Build Settings. Feel free to use the script in your project and modify it to fit your needs.
     
    RobotReebot likes this.
  7. RobotReebot

    RobotReebot

    Joined:
    Jul 31, 2014
    Posts:
    13
    Thank you very much, if i need help i'll write you, if it's not a problem ;)
     
    unity-nikkolai likes this.
  8. RobotReebot

    RobotReebot

    Joined:
    Jul 31, 2014
    Posts:
    13
    I solve this.

    Simple update your Net.Framework from 3.5 ( in MonoDevelop) to 4.0, and all the errors will disappear
     
  9. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    Interesting. My version of MonoDevelop is still using .net Framwork 3.5 for each assembly. Haven't seen this error. Wonder what's causing the error for you between .net versions.

    Thanks for posting the solution!