Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
zebrajr

[Help | VSE13] Error on compiling script

Recommended Posts

zebrajr

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

Share this post


Link to post
Share on other sites
zebrajr

*Bump*

Anyone? :(

Share this post


Link to post
Share on other sites
Fireboyd78

Post your code on Pastebin.

Share this post


Link to post
Share on other sites
zebrajr

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

Share this post


Link to post
Share on other sites
zebrajr

Help pl0x :(

Bump

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
zebrajr

 

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 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.