• 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 /
avatar image
0
Question by Fuzzysalsa · Jul 11, 2014 at 02:22 AM · playersad

error CS1729: The type `UnityEngine.Rect' does not contain a constructor that takes `5' arguments

Please help me. It says that the problem is on line 39.

Line 39:
GUI.Label (new Rect(Screen.width / 2 - 150, 200, 2000, 1000, "PLAYER ONE WINS"));

Please help. Thank You.

Comment
Add comment · Show 5
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 Bunny83 · Jul 11, 2014 at 02:54 AM 2
Share

Bored$$anonymous$$ormon already answered this but .... do you actually read the error? Do you know what a constructor is? Do you know what an argument is? If you don't, it's really (REALLY) time to look it up.

This is like you're driving your car for one and a half years now and suddenly you ask yourself what the middle pedal is actually good for....

avatar image Kiwasi · Jul 11, 2014 at 02:59 AM 1
Share

I figured they were ahead of the game for being able to read the error line number. Something we don't often see in newbies.

By the way, what does that middle pedal do?

avatar image flaviusxvii · Jul 11, 2014 at 03:06 AM 0
Share

what does that middle pedal do

Ejects the passengers. What else?

avatar image Kiwasi · Jul 11, 2014 at 03:14 AM 0
Share

Ejects the passengers

$$anonymous$$ust remember to push it down hard next time the kids are playing up.

avatar image Bunny83 · Jul 11, 2014 at 10:44 AM 0
Share

@flaviusxvii: :) That's actually true in case you're also wondering what's that strange belt at the side of your driver seat. :D

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Kiwasi · Jul 11, 2014 at 02:23 AM

Closing bracket of rect in the wrong place. Correct code as follows

 GUI.Label (new Rect(Screen.width / 2 - 150, 200, 2000, 1000), "PLAYER ONE WINS");

Comment
Add comment · Share
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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

How do I make it so that I can attack more than 1 enemy? 1 Answer

I can't look up and down because of animation on camera? 2 Answers

Make player unable to shoot when reloading 3 Answers

Network disconnect player 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges