Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Aug 12, 2014 at 12:48 AM by Kiwasi for the following reason:

Duplicate Question: On UA multiple times. Comments provide sufficient detail for OP to fix problem.

avatar image
0
Question by King Sosa · Aug 12, 2014 at 12:40 AM · androidadsparsing errorcs8025

error CS8025: Parsing error

Hello guys, I'm new to coding, however I created a simple 2D game for android devices with the help of a template and some tutorials to modify it. Anyway, I would like to monetize the game with Chartboost ads. I tried to write a script that when the game opens, when the Menu appears the ad will pop up/show. Below you can see the script I made in C#. I am getting this error: Assets/Ad Networks Prefabs/Show Ads.cs(28,9): error CS8025: Parsing error

 using UnityEngine;
 using System.Collections;
 
 public class ShowAds : MonoBehaviour {
 
     string chartboostAppID = "hidden for secure purposes";
     string chartboostAppSignature = "hidden for secure purposes";
 
     // Use this for initialization
     void Start () {
         ChartboostAndroid.init( chartboostAppID, chartboostAppSignature, true );
         ChartboostAndroid.cacheInterstitial( null );
 
         i=Random.Range(1,4);
 
         if(i==2)
         {
             Ads();
         }
         
     }
     
     void  Ads (){
         ChartboostAndroid.showInterstitial( null );
     }
 }
     
     }
     
     // Update is called once per frame
     void Update () {
     
     }
 }





Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image TrickyHandz · Aug 12, 2014 at 12:46 AM 1
Share

Just as @robertu stated, you have extra braces in your code. Delete the braces at lines 26 and 28. That should fix the problem.

avatar image thornekey · Aug 12, 2014 at 12:55 AM 0
Share

Your issue is on L26. Remove that curly brace.

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Video ads closing when player leaves app. 2 Answers

Are apps with unity ads allowed in amazon app store?? 1 Answer

App asking for permissions that are not needed 2 Answers

How to implement Admob Native Ads on a ScrollRect in Unity 2 Answers

Unity ads are working in editor but not on android device 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges