Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411421 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 10:21:16 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Variable name creates error
Pages: [1]
Print
Author Topic: Variable name creates error  (Read 544 times)
davejones
Level 0
**


View Profile
« on: July 20, 2018, 05:47:55 AM »

I have created a Boolean variable called 3D_pressed and have got the error "error CS1519: Unexpected symbol `3' in class, struct, or interface member declaration". How do I solve this? This is in unity using the the programming language C#.

Logged
oahda
Level 10
*****



View Profile
« Reply #1 on: July 20, 2018, 06:12:33 AM »

In most programming languages, the names you give to things cannot start with a number. You'll have to change it to threedee_pressed or something.
Logged

davejones
Level 0
**


View Profile
« Reply #2 on: July 20, 2018, 06:19:35 AM »

In most programming languages, the names you give to things cannot start with a number. You'll have to change it to threedee_pressed or something.
Thanks for your reply. I will change the variable name.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic