![]() |
|
|
|
#1
|
|||
|
|||
|
you must set a reference to System.Linq.dll the before loading the namespaces, but may be you need others dlls too.
Example: //$reference System.Data.dll //$reference System.Linq.dll //$reference System.XML.dll using System; using System.Data; using System.Linq; |
|
#2
|
|||
|
|||
|
Thanks for the reply Kodiak.
I had added the using statements and the project compile successfully in VS2010 Express. However, it would not compile in FMB when right clicking 'Compile' on the scripting window. |
|
#3
|
|||
|
|||
|
There is no need to "compile" it in FMB.
Start your mission and then open the console, if there no errors like missing assembly etc. the script should work. |
|
#4
|
|||
|
|||
|
The FMB crashes when I load the mission. It is working fine if I re-write the LINQ statement with a foreach loop.
|
|
#5
|
|||
|
|||
|
Hm had no problem with linq, but i only tried a little test script.
|
|
#6
|
|||
|
|||
|
Very strange,
I know that unused using statments are disregarded by the compiler in C#. Did you write any LINQ statements or just add the reference? |
|
#7
|
|||
|
|||
|
Only a little Linq statement.
Sometimes it helps if you delete the cache of CoD. Can you attach a sample script of your code so i can test it on my computer? |
![]() |
|
|