![]() |
#1
|
|||
|
|||
![]()
As I am a bit more proficient in Visual Basic and less so in C# (where I have none) I would like to know if it is possible to script in Visual Basic. To my knowledge, the Framework logic implies that the code can be written in any object oriented language and is compiled during the execution rendering the function independent of the language. So basically, as I understand it, it should be possible. But what do the scripting experts think about this?
|
#2
|
|||
|
|||
![]()
If the scripting is run on the .NET Framework then you're right that there could be a choice of languages. C# and VB.NET both compile down to the same Intermediary Language (IL) that's then used by the framework to execute.
On a quick test it doesn't look as if a .vb file is picked up in the same was as a .cs file for a mission is. This would mean a change to CloD I think, as currently it looks for a source code file and then assumes it's C# code. There are pros and cons of offering both, in that it would be easier to get started for those that know some VB or VBScript but then a downside it would mean a lot of the library of samples would get duplicated or not understood by the other half of the community. |
#3
|
|||
|
|||
![]()
Have tried it also - same result.
But you can generate your own Dlls in VB and then use them in CoD. |
#4
|
|||
|
|||
![]()
I am not sure if I understand your message correctly, frog. So basically you say it is possible but with uncertain results?
@Kodiak: So in principle I could write what I want to do into dll's using vb and then write a c#-script that runs the dll's? Not a convenient thing to do but would it work? |
#5
|
|||
|
|||
![]()
If the .vb file is not loaded one could try to write the VB code within a .cs file.
Another solution would be to automatically convert the VB code into C# and then paste it into the script file of the mission. Online converter: http://www.carlosag.net/tools/codetranslator/ |
#6
|
|||
|
|||
![]()
Have tried the cs file but get a compiler error in game.
|
#7
|
|||
|
|||
![]()
Bad. Very bad. So no vb for me
![]() |
![]() |
|
|