Hello im repairing an old mod from Risk of Rain 2 and need help.
My Microsoft Visual Studio in which i code in is giving me errors
in line 61 for "Value"
and line 63 for ref
27 Replies
1. C# is case-sensitive.
value
and Value
are not the same thing
2. That's not how ref
works@ZZZZZZZZZZZZZZZZZZZZZZZZZ first thank you and second how does it work?
It's only valid for method arguments
what would i need to insert then?
thx#
¯\_(ツ)_/¯
Should prolly just delete all of this
Also, it's usually a good idea to learn using a language first, before trying to modify complex code written in that language
I just wanted to fix that mod because it had a useful feature that is annoying otherwise
@ZZZZZZZZZZZZZZZZZZZZZZZZZ the value issue still isnt resolved
Same error?
pretty much
What type is
LunarCommandEssences
?Nstrip?
no thats LunarCommandEssence thats the wrong one
i think its bool tho
Think or know?
Because from error message alone I can tell that here it's of type
object
i dont know
It tells you that it's a field in this class
So go look at that field
And tell me what type it is
(it's
object
btw)
object
does not have a property .Value
@ZZZZZZZZZZZZZZZZZZZZZZZZZ fixed it
its a bool now
A bool does not have a
value
property either
So just remove it
Since a bool itself is... a boolit works ?
why tho
i dont understand now why does it work when it shouldnt have value?
Well now it's a
ConfigEntry<bool>
So entirely possible that a ConfigEntry<T>
does, indeed, have a .Value
property
Not a .value
one thoughok thank you!