Cosmos: Plug error

Created on 22 Aug 2020  路  9Comments  路  Source: CosmosOS/Cosmos

I have seen two other issues about plugs of which I did the instructions for one issue, in which the person added the plugs from this repo to his project.
But I can't understand where to put them, I put in kernel.cs folder but still error, then I referenced from plugs to kernel and vice versa but still.
So what should I do
I have vs 2019
And latest cosmos
Edit: when I removed doubles and floats it works

Plugs

All 9 comments

You have to install the devkit and put them in cosmos source code, usually in the project Kernel G2, Cosmos.System2_Plugs in a file corresponding to the plugged class.

Should I add to the project template as I searched in my whole drive for cosmos but the only thing I can find is a templates folder in vs extensions directory
And also what do you mean by kernel g2 and where is cosmos.system2_plugs, is it a folder???

Do you have the devkit installed? What class do you want add a plug to?

I need to add a plug to the static commands class (made) located in the chocosv1 namespace in another file, referenced to in the kernel so that I can run command functions from void run()
The function needing plug is a public static double ChoCalc(string exp)
I don't have the devkit as I will install

I am not sure if plugging custom dlls works, but what I would try is make a new file in the devkit source code, for example in the Cosmos.System2_Plugs. There I would create a file, with the plug attribute, linking to the class you mentioned and add the plug in that class. You will have to add a reference to the chocosv dll. Then build the devkit and if it works, the plug should be there.

But after installing devkit where would the source be???
And also I'm talking about using the SingleImpl and DoubleInpl plugs available on this repository
And after I add plugs to source do I have to recreate the project

What exactly are you tring to do?
Expand with an in-depth explanation so we can understand exactly what is the issue you are facing.

The source code of Cosmos is in the in the directory Cosmos/source/
As EliaSulimanov said, please expand upon what you mean with Single and Double plugs and your final point

Well, I have a public float ChoCalc() which when added to the code creates an error which I'll tell you in an edit, but as soon as I removed the float and a double in my kernel it worked fine as I wanted it.
So I thought about using the single and double plugs located in this repository but I don't know how to use them as I didn't understand the article on gocosmos.org.
I'll check on my PC and tell you the errors and the result after trying to use the plugs by putting in the directory mentioned as I'm outdoors currently.
Thanks anyway :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

geomtech picture geomtech  路  9Comments

Vardan2009 picture Vardan2009  路  11Comments

geomtech picture geomtech  路  6Comments

TFTWPhoenix picture TFTWPhoenix  路  7Comments

jpmac26 picture jpmac26  路  8Comments