Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeneralExtensions.cs causes compile errors #19

Open
recursor94 opened this issue Mar 11, 2016 · 2 comments
Open

GeneralExtensions.cs causes compile errors #19

recursor94 opened this issue Mar 11, 2016 · 2 comments

Comments

@recursor94
Copy link

After installing the latest version of kera lua into my project and configuring the player settings list, I can not even compile the project due to these errors:

`Assets/NLua/Extensions/GeneralExtensions.cs(65,36): error CS1501: No overload for method `GetMethods' takes `2' arguments

Assets/NLua/Extensions/GeneralExtensions.cs(66,35): error CS0411: The type arguments for method `System.Linq.Enumerable.Any<TSource>(this System.Collections.Generic.IEnumerable<TSource>, System.Func<TSource,bool>)' cannot be inferred from the usage. Try specifying the type arguments explicitly

Assets/NLua/Extensions/GeneralExtensions.cs(114,36): error CS1502: The best overloaded method match for `System.Type.GetMethod(string, System.Reflection.BindingFlags)' has some invalid arguments
Assets/NLua/Extensions/GeneralExtensions.cs(114,36): error CS1503: Argument `#2' cannot convert `System.Reflection.BindingFlags' expression to type `System.Reflection.BindingFlags'

Assets/NLua/Extensions/GeneralExtensions.cs(142,34): error CS1501: No overload for method `GetMethods' takes `2' arguments

Assets/NLua/Extensions/GeneralExtensions.cs(161,78): error CS1501: No overload for method `GetMethods' takes `2' arguments

Assets/NLua/Extensions/GeneralExtensions.cs(165,38): error CS1928: Type `object' does not contain a member `ToArray' and the best extension method overload `System.Linq.Enumerable.ToArray<System.Reflection.MethodInfo>(this System.Collections.Generic.IEnumerable<System.Reflection.MethodInfo>)' has some invalid arguments

Assets/NLua/Extensions/GeneralExtensions.cs(165,38): error CS1929: Extension method instance type `object' cannot be converted to `System.Collections.Generic.IEnumerable<System.Reflection.MethodInfo>'

`

@recursor94
Copy link
Author

Just as an update the problem was that I was trying to build it for webgl. Trying to build this as either a webgl application or an android application throws either this error or a related 'system.environment' not found error.

I know the author of this asset has stated that his focus is on pc game support, but is there anyway to fix these errors so that I can build and run my game on those platforms?

@CogentInvalid
Copy link

I ran into the same problem, and I seem to have solved it by deleting the file NLua/Platform/BindFlags.cs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants