Raised This Month: $18 Target: $400
 4% 

SteamWorks & "new style declaration"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 09-27-2019 , 05:11   SteamWorks & "new style declaration"
Reply With Quote #1

Is there a SteamWorks version out using the "new-style declarations"! I've got a problem with compiling when I use this version:
http://users.alliedmods.net/~kyles/builds/SteamWorks/

Is there any problem in just switching "#pragma newdecls required" off?
fragnichtnach is offline
CrazyHackGUT
AlliedModders Donor
Join Date: Feb 2016
Location: Izhevsk, Russia
Old 09-27-2019 , 05:17   Re: SteamWorks & "new style declaration"
Reply With Quote #2

... or move include directives before requiring newdecls?
__________________
My english is very bad. I am live in Russia. Learning english language - very hard task for me...
CrazyHackGUT is offline
Send a message via ICQ to CrazyHackGUT Send a message via Skype™ to CrazyHackGUT
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 09-27-2019 , 05:36   Re: SteamWorks & "new style declaration"
Reply With Quote #3

Yes, the include is before the "pragma newdecals required". Still getting errors. :-/
fragnichtnach is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 09-27-2019 , 06:25   Re: SteamWorks & "new style declaration"
Reply With Quote #4

Post your code
__________________
8guawong is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 09-27-2019 , 06:48   Re: SteamWorks & "new style declaration"
Reply With Quote #5

It is the actual get5 code:
https://github.com/splewis/get5

with the newest:
http://users.alliedmods.net/~kyles/builds/SteamWorks/

Code:
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(215) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(216) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(217) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(218) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(219) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(219) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(220) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(220) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(221) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(221) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(222) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(223) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(223) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(223) : error 147: new-style declarations are required
// E:\sourcemod-1.8.0-git6050-windows (4)\addons\sourcemod\scripting\include\SteamWorks.inc(223) : fatal error 190: too many error messages on one line
Code:
#include "include/get5.inc"
#include "include/logdebug.inc"
#include "include/restorecvars.inc"
#include <cstrike>
#include <json>  // github.com/clugg/sm-json
#include <sdktools>
#include <sourcemod>
#include <testing>

#undef REQUIRE_EXTENSIONS
#include <SteamWorks>

#define CHECK_READY_TIMER_INTERVAL 1.0
#define INFO_MESSAGE_TIMER_INTERVAL 29.0

#define DEBUG_CVAR "get5_debug"
#define MATCH_ID_LENGTH 64
#define MAX_CVAR_LENGTH 128
#define MATCH_END_DELAY_AFTER_TV 10

#define TEAM1_COLOR "{LIGHT_GREEN}"
#define TEAM2_COLOR "{PINK}"
#define TEAM1_STARTING_SIDE CS_TEAM_CT
#define TEAM2_STARTING_SIDE CS_TEAM_T
#define KNIFE_CONFIG "get5/knife.cfg"
#define DEFAULT_TAG "[{YELLOW}Get5{NORMAL}]"

#pragma semicolon 1
#pragma newdecls required
[..]

Last edited by fragnichtnach; 09-27-2019 at 06:50.
fragnichtnach is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 09-27-2019 , 16:02   Re: SteamWorks & "new style declaration"
Reply With Quote #6

That's because you're using the json include. Place the SteamWorks include above the json include or vice versa.

You can also go through each of the json include files and remove the line #pragma newdecls required
__________________
Maxximou5 is offline
Timocop
AlliedModders Donor
Join Date: Mar 2013
Location: Germany
Old 09-27-2019 , 16:52   Re: SteamWorks & "new style declaration"
Reply With Quote #7

PHP Code:
#pragma newdecls optional
#include <SteamWorks>
#pragma newdecls required 
__________________
Timocop is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 09-28-2019 , 03:09   Re: SteamWorks & "new style declaration"
Reply With Quote #8

Quote:
Originally Posted by Timocop View Post
PHP Code:
#pragma newdecls optional
#include <SteamWorks>
#pragma newdecls required 
that works. really easy. thanks
fragnichtnach is offline
clug
Junior Member
Join Date: May 2016
Location: Australia
Old 09-29-2019 , 01:31   Re: SteamWorks & "new style declaration"
Reply With Quote #9

Quote:
Originally Posted by fragnichtnach View Post
that works. really easy. thanks
Just so you know, sm-json has been updated to fix this issue (here). You can safely remove the optional pragma now.
clug is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:45.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode