Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Happy Holidays from the GTANet team!

[Help | VSE13] Error on compiling script


zebrajr
 Share

Recommended Posts

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 use
1> 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 by zebrajr
Link to comment
Share on other sites

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 by zebrajr
Link to comment
Share on other sites

rehergrehrgerg
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

 

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 by zebrajr
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.