From 3385d96b544ce8007bb177b0be636faaa8964348 Mon Sep 17 00:00:00 2001 From: BotoX Date: Wed, 8 Aug 2018 01:10:41 +0200 Subject: [PATCH] fix compiling with latest sourcemod --- compile-all.py | 2 +- compile.py | 2 +- includes/SteamWorks.inc | 32 +++++++++---------- .../scripting/include/nativevotes.inc | 16 +++++----- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/compile-all.py b/compile-all.py index 40e034c6..2c9c8a72 100755 --- a/compile-all.py +++ b/compile-all.py @@ -31,7 +31,7 @@ if __name__ == "__main__": OutDir = "plugins" OutPath = os.path.join(OutDir, os.path.splitext(os.path.basename(SourcePath))[0] + ".smx") - Compiler = [SPCOMP, "-i" + SM_INCLUDES] + Compiler = [SPCOMP, "-i" + SM_INCLUDES, "-i" + "include"] if os.path.isdir(IncludePath): Compiler.append("-i" + IncludePath) Compiler.append(SourcePath) diff --git a/compile.py b/compile.py index ffe789f3..6738cc22 100755 --- a/compile.py +++ b/compile.py @@ -28,7 +28,7 @@ if __name__ == "__main__": OutDir = "plugins" OutPath = os.path.join(OutDir, os.path.splitext(os.path.basename(SourcePath))[0] + ".smx") - Compiler = [SPCOMP, "-i" + SM_INCLUDES] + Compiler = [SPCOMP, "-i" + SM_INCLUDES, "-i" + "include"] if os.path.isdir(IncludePath): Compiler.append("-i" + IncludePath) Compiler.append(SourcePath) diff --git a/includes/SteamWorks.inc b/includes/SteamWorks.inc index 2fcd8e51..7c4b2d40 100644 --- a/includes/SteamWorks.inc +++ b/includes/SteamWorks.inc @@ -203,25 +203,25 @@ native bool:SteamWorks_SetHTTPRequestNetworkActivityTimeout(Handle:hHandle, time native bool:SteamWorks_SetHTTPRequestHeaderValue(Handle:hHandle, const String:sName[], const String:sValue[]); native bool:SteamWorks_SetHTTPRequestGetOrPostParameter(Handle:hHandle, const String:sName[], const String:sValue[]); -funcenum SteamWorksHTTPRequestCompleted +typeset SteamWorksHTTPRequestCompleted { - public(Handle:hRequest, bool:bFailure, bool:bRequestSuccessful, EHTTPStatusCode:eStatusCode), - public(Handle:hRequest, bool:bFailure, bool:bRequestSuccessful, EHTTPStatusCode:eStatusCode, any:data1), - public(Handle:hRequest, bool:bFailure, bool:bRequestSuccessful, EHTTPStatusCode:eStatusCode, any:data1, any:data2) + function int (Handle hRequest, bool bFailure, bool bRequestSuccessful, EHTTPStatusCode eStatusCode); + function int (Handle hRequest, bool bFailure, bool bRequestSuccessful, EHTTPStatusCode eStatusCode, any data1); + function int (Handle hRequest, bool bFailure, bool bRequestSuccessful, EHTTPStatusCode eStatusCode, any data1, any data2); }; -funcenum SteamWorksHTTPHeadersReceived +typeset SteamWorksHTTPHeadersReceived { - public(Handle:hRequest, bool:bFailure), - public(Handle:hRequest, bool:bFailure, any:data1), - public(Handle:hRequest, bool:bFailure, any:data1, any:data2) + function int (Handle hRequest, bool bFailure); + function int (Handle hRequest, bool bFailure, any data1); + function int (Handle hRequest, bool bFailure, any data1, any data2); }; -funcenum SteamWorksHTTPDataReceived +typeset SteamWorksHTTPDataReceived { - public(Handle:hRequest, bool:bFailure, offset, bytesreceived), - public(Handle:hRequest, bool:bFailure, offset, bytesreceived, any:data1), - public(Handle:hRequest, bool:bFailure, offset, bytesreceived, any:data1, any:data2) + function int (Handle hRequest, bool bFailure, int offset, int bytesreceived); + function int (Handle hRequest, bool bFailure, int offset, int bytesreceived, any data1); + function int (Handle hRequest, bool bFailure, int offset, int bytesreceived, any data1, any data2); }; native bool:SteamWorks_SetHTTPCallbacks(Handle:hHandle, SteamWorksHTTPRequestCompleted:fCompleted = INVALID_FUNCTION, SteamWorksHTTPHeadersReceived:fHeaders = INVALID_FUNCTION, SteamWorksHTTPDataReceived:fData = INVALID_FUNCTION, Handle:hCalling = INVALID_HANDLE); @@ -237,11 +237,11 @@ native bool:SteamWorks_GetHTTPStreamingResponseBodyData(Handle:hRequest, cOffset native bool:SteamWorks_GetHTTPDownloadProgressPct(Handle:hRequest, &Float:percent); native bool:SteamWorks_SetHTTPRequestRawPostBody(Handle:hRequest, const String:sContentType[], const String:sBody[], bodylen); -funcenum SteamWorksHTTPBodyCallback +typeset SteamWorksHTTPBodyCallback { - public(const String:sData[]), - public(const String:sData[], any:value), - public(const data[], any:value, datalen) + function int (const char[] sData); + function int (const char[] sData, any value); + function int (const int[] data, any value, int datalen); }; native bool:SteamWorks_GetHTTPResponseBodyCallback(Handle:hRequest, SteamWorksHTTPBodyCallback:fCallback, any:data = 0, Handle:hPlugin = INVALID_HANDLE); diff --git a/mapchooser_extended/scripting/include/nativevotes.inc b/mapchooser_extended/scripting/include/nativevotes.inc index c02c5bdf..9be97909 100644 --- a/mapchooser_extended/scripting/include/nativevotes.inc +++ b/mapchooser_extended/scripting/include/nativevotes.inc @@ -422,14 +422,14 @@ native NativeVotes_Cancel(); * @param item_votes Array of vote vote counts. Parallel with item_indexes. * @noreturn */ -functag public NativeVotes_VoteHandler(Handle:vote, - num_votes, - num_clients, - const client_indexes[], - const client_votes[], - num_items, - const item_indexes[], - const item_votes[]); +typedef NativeVotes_VoteHandler = function int (Handle vote, + int num_votes, + int num_clients, + const int[] client_indexes, + const int[] client_votes, + int num_items, + const int[] item_indexes, + const int[] item_votes); /** * Function to convert client/vote arrays into their two-dimensional versions, * which can then be passed to a standard vote handler.