error: feature `declaration expression' cannot be used because it is not part of the c# 6.0 language
in unity i am getting this error here:
feature declaration expression cannot be used because it is not part of the c# 6.0 language specification
i don't know how to fix that.
can someone please help me?
thanks.
here the full code: https://pastebin.com/KQt7rG72
line 439.Pastebin
using System;using System.Collections.Generic;using SBS.Math;using ...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
42 Replies
Is this the result of a decompiler?
What are all these
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
it is
the casts give it away
if the comments didn't already
In which case the error appears to be that you're using a decompiler (for some reason) which has decompiled the code to a version greater than that which the Unity version that you're using supports.
Yeah definitely decompiled unity code
Which brings up the question of tos breakage
Although if you're wondering what the error actually means, you can't do
out var hitInfo
in C# 6, you have to declare hitInfo
before the method call and do just out hitInfo
.I'm sorry man
Thx bro
so how should i declare it? like
int hitinfo;
?what type is
hitinfo
supposed to be?uh
just updated the script a bit because i destroyed it a bit.
Pastebin
// Warning: Some assembly references could not be resolved automati...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
anyways
back to the error
Just gonna ask again, why are you decompiling this and from where is this?
it was an unity game back from 2013
i think
and it stopped working on browser
like
i mean
i can run it
but
there are no play buttons
and we can't figure it out why
it has to do something with the unity player
so some people asked me if i can just do a standalone version of the game
so i agreed
idk man
the game is called
Lose the Heat 3
i have all the files
the only thing i need to do is fix the scripts
thats all
but if you can't help me out
then its fineIt's still the same error as before?
yea
What type is
hitInfo
?
You just have to declare it before using it in the GetToken
call and change out var hitInfo
to just out hitInfo
can you tell me how to declare it? since my english is not that good. xD
like you wrote here
oh ok wait
huh
like this?
what does the error say?
that's... odd
oh you just spelled it wrong
oh
what does it say now?
well you declared it with the wrong type then
what type should i declare?
says in the error
TokensManager.TokenHit
oh ok wait
so it means:
int TokensManager.TokenHit;
or this one?
again, what is the error
no idea what that is supposed to mean
Why does it say
Assembly-CSharp
and why are the method names differentidk man
this shit way too complicated
however
in unity
the error is gone
i don't give a shit then
if the error is gone then good
anways
thx guys really
you really have a heart of gold
i gtg now
cya
$close
Use the
/close
command to mark a forum thread as answeredWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.