zebrajr Posted June 12, 2015 Share Posted June 12, 2015 (edited) Hello Everyone, So, first of: - I'm new to modding, so please bare with me - I'm bew to Visual Studio, not new to programming, so I know the code works, I can't figure what include is missing. Ok, now on the main subject. So I've decided to reboot https://www.gta5-mods.com/vehicles/manual-transmission, since the Mod got discontinued, and I've wanted a Manual Transmission mod. I've edited the code, made major changes (cleaner code, if to Switches, Sequential gear, more gears, etc, etc). Source code is available on the mod page but I can provide mine version if required. So, here comes the part of being new to Visual Studio. I will start by saying what I did and hope that someone can pin point me where I went wrong or what I'm missing. - Visual Studio Express 2013 > New Project > Visual C++ > DLL - I've downloaded ScriptHookV SDK, got all the *.h files in a single Folder (inclduing the ones in the Sample Folder and the ScriptHookV.lib). Changed the script.h "#include "..\..\inc\natives.h"" to "#include "natives.h"" - Copied all the *.h files and the ScriptHookV.lib to my project folder "..\Projects\MT1\MT1\MT1.Shared\" - Copied the re-done code to the Visual Studio main.cpp Issues: 10+ errors- All saying "IntelliSense identifier "reset_globals" is undefined, "IntelliSense identifier "is_control_pressed" is undefined, "IntelliSense identifier "is_ped_in_any_vehicle" is undefined", etc. 10+ errors - IntelliSense name followed by "::" must be a class or namespace name Besides those errors, no syntax, no ";" missing, nothing. Can someone point me in the right direction? Tried searching Google but nothing comes up related to the issue. Searched the forums, but also with no solution that I've found. Would really like to make this one, to re-continue the Manual Transmission Mod, and afterwards start working on a few more mods. Thank you in advance, Sincerely, zebrajr Edit: Output repeats itself with every include saying:'#include <stdio.h>': skipped when looking for precompiled header use1> Add directive to 'pch.h' or rebuild precompiled header Edit 2: I've created a DLL project because AFAIK, to create ASI files, I need to make a DLL and then change the extension. Edit 3: So I've tried to fix the warning of the "pch.h" but if I include the file I get over 100 errors xD My includes: #pragma warning(disable:4996) #include <windows.h> #include <stdio.h> #include <string> /* #include <psapi.h> */ #include <stdint.h> #include <iostream> #include <fstream> #include <sstream> using namespace std; #include "script.h" #include <string> #include <ctime> Edited June 12, 2015 by zebrajr Link to comment Share on other sites More sharing options...
zebrajr Posted June 13, 2015 Author Share Posted June 13, 2015 *Bump* Anyone? Link to comment Share on other sites More sharing options...
Fireboyd78 Posted June 13, 2015 Share Posted June 13, 2015 Post your code on Pastebin. Link to comment Share on other sites More sharing options...
zebrajr Posted June 13, 2015 Author Share Posted June 13, 2015 (edited) Post your code on Pastebin. http://pastebin.com/UmvpckDz Thanks, zebrajr Edit: The Full Error Output 1 IntelliSense: identifier "reset_globals" is undefined <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 60 2 MT1.Windows 2 IntelliSense: identifier "GetHash" is undefined <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 70 24 MT1.Windows 3 IntelliSense: identifier "get_key_pressed" is undefined <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 72 7 MT1.Windows 4 IntelliSense: name followed by '::' must be a class or namespace name <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 72 23 MT1.Windows 5 IntelliSense: identifier "ShowText" is undefined <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 75 9 MT1.Windows 6 IntelliSense: identifier "is_ped_in_any_vehicle" is undefined <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 81 8 MT1.Windows 7 IntelliSense: identifier "player_ped_id" is undefined <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 81 30 MT1.Windows 8 IntelliSense: identifier "vehid" is undefined <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 83 44 MT1.Windows 9 IntelliSense: identifier "GearSc" is undefined <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 93 6 MT1.Windows 10 IntelliSense: name followed by '::' must be a class or namespace name <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 214 26 MT1.Windows 11 IntelliSense: name followed by '::' must be a class or namespace name <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 221 26 MT1.Windows 12 IntelliSense: name followed by '::' must be a class or namespace name <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 228 26 MT1.Windows 13 IntelliSense: name followed by '::' must be a class or namespace name <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 236 26 MT1.Windows 14 IntelliSense: name followed by '::' must be a class or namespace name <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 244 26 MT1.Windows 15 IntelliSense: name followed by '::' must be a class or namespace name <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 252 26 MT1.Windows 16 IntelliSense: identifier "vehid" is undefined <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 261 44 MT1.Windows 17 IntelliSense: identifier "update_features" is undefined <<%path%>>Projects\MT1\MT1\MT1.Shared\dllmain.cpp 267 3 MT1.Windows Edited June 13, 2015 by zebrajr Link to comment Share on other sites More sharing options...
zebrajr Posted June 13, 2015 Author Share Posted June 13, 2015 Help pl0x Bump Link to comment Share on other sites More sharing options...
rehergrehrgerg Posted June 14, 2015 Share Posted June 14, 2015 Why are you compiling c# in c++? it kinda seems you have no idea what you're doing, maybe you should start at the basics. Link to comment Share on other sites More sharing options...
zebrajr Posted June 16, 2015 Author Share Posted June 16, 2015 (edited) Why are you compiling c# in c++? it kinda seems you have no idea what you're doing, maybe you should start at the basics. Actually I've tried to compile as a DLL in C# but I get the same errors. Forgot to edit the post after that but anyway, the issue seems to be I can't import the ScriptHook library to my Visual Studio, at least when I link the file it doesn't seems to get recognized, and I can't use the functions from the NATIVEDB. Got my way around it making it as a LUA mod instead, working exacly the same. Post can now be closed imho. Thank you all once again, Sincerely, zebrajr @rehergrehrgerg I do know what I am doing, it just that I never made a mod before (to any game, like I stated in my OP) therefore I wanted to see why I couldn't use the library on Visual Studio. If you read the post completely you would see the problem was not the typo of C# for C++ but libraries not being useable in Visual Studio. Thanks anyway. Edited June 16, 2015 by zebrajr Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now