Cannot assign void to an implicitly-typed local variable (line 217)

Hi there,

I am trying to use the NodalDisp.solve class NodalDisp.solve Method

From the documentation, it seems that 4 arguments are needed but from my errors, I understood that 5 arguments are required. I understand the input types but what is needed is not clear. I have been trying to debug this for 3 hours and I would really appreciate some help

image of script below

error below

  1. Error (CS0815): Cannot assign void to an implicitly-typed local variable (line 217)

I am basically trying to compute the nodal displacements of my model.
file attached here

C_-3c329.cs (8.8 KB)

Any help would be greatly appreciated!
thanks in advance

I also decompiled the karambacommon.dll with ILSpy to see the inner workings and I am still not sure what the error is.

argument0: Karamba.Models.Model
a karamba model
argument1: string lc_id
a string for the load case
argument2: List nodeIndexes
list of node ids as integers
argument3: out List<List>
argument4: out List<List>

and if you see my code above I have tried to enter the arguments in the exact same argument types

Dear @moo,
‘NodalDisp.solve’ returns void. Remove ‘var test =’ and it works:
NodalDisplacementTest.gh (7.6 KB).
– Clemens

1 Like

understood thanks a lot for the response!

I realize that I had a lack of understanding of Csharp.
I am a python programmer and I shifted to Csharp to use the Karamba API