Log in to reply
 

Scripting with C++



  • I've been making scripts with C# and now i wanna try C++. The readme that comes with the ScriptHookV SDK says "the samples were build using MSVC 2013", as in the sample projects that come with the SDK... now, do i really need to install Visual Studio 2013 to build ASI scripts? I built a script using Visual Studio 2022 and it doesn't start :sweat:



  • @JustDancePC If your script is dot net you might be using the wrong framework version?



  • @JohnFromGWN Maybe i didn't explain myself correctly. I'm trying to build an ASI script, not .NET



  • @JustDancePC sorry i read too quickly. You would think the c++ compiler is backwards compatible. Likely a setting you need to change. Also keep in mind that the native functions from 2013 do not necessarily exist after all the GTA5 updates. Ive come across a few functions which have been replaced.



  • @JohnFromGWN Yeah, that's what i thought too, it's probably some setting i need to change. I guess you make mods too (? If you do, could you tell me what settings you have so i can setup my project correctly? 🙏



  • NVM, i restarted the game and it works now, even the hot reload feature which wasn't working either 🤦. Before, i was loading a previous save file, i thought that would work since it does for .NET scripts



  • @JustDancePC Sorry I don't create mods. I'm still on the 32 bit version of VS (2019). I do my best to script, but in dot net. I've seen framework compatability issues but that's not with C++. You will like have issues with support given asi is GTA5 specific and the forums are pretty dead in that respect.



  • @JohnFromGWN Thanks for the help anyways



  • VS 2013 is not required, as you've already found out.

    To do a hot reload you need to create a ScriptHookV.dev file in the GTA V directory, then while in-game press CLTR + R twice to reload. Please keep in mind that doing this breaks ScriptHookVDotNet until you restart the game, if I recall correctly.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.