AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   SteamWorks & "new style declaration" (https://forums.alliedmods.net/showthread.php?t=318888)

fragnichtnach 09-27-2019 05:11

SteamWorks & "new style declaration"
 
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?

CrazyHackGUT 09-27-2019 05:17

Re: SteamWorks & "new style declaration"
 
... or move include directives before requiring newdecls? :)

fragnichtnach 09-27-2019 05:36

Re: SteamWorks & "new style declaration"
 
Yes, the include is before the "pragma newdecals required". Still getting errors. :-/

8guawong 09-27-2019 06:25

Re: SteamWorks & "new style declaration"
 
Post your code

fragnichtnach 09-27-2019 06:48

Re: SteamWorks & "new style declaration"
 
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
[..]


Maxximou5 09-27-2019 16:02

Re: SteamWorks & "new style declaration"
 
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

Timocop 09-27-2019 16:52

Re: SteamWorks & "new style declaration"
 
PHP Code:

#pragma newdecls optional
#include <SteamWorks>
#pragma newdecls required 


fragnichtnach 09-28-2019 03:09

Re: SteamWorks & "new style declaration"
 
Quote:

Originally Posted by Timocop (Post 2668216)
PHP Code:

#pragma newdecls optional
#include <SteamWorks>
#pragma newdecls required 


that works. really easy. thanks

clug 09-29-2019 01:31

Re: SteamWorks & "new style declaration"
 
Quote:

Originally Posted by fragnichtnach (Post 2668239)
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.


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

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.