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
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1248691548493844600/image.png)
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1248691548774731877/image.png)
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#
¯\_(ツ)_/¯
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1248694842360336535/image.png)
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 description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1248701221783474277/image.png)
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
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1248703827880972398/image.png)
i dont know
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1248704719799586867/image.png)
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
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1248708757920415874/image.png)
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 ?
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1248709011457704006/image.png)
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!