Raised This Month: $ Target: $400
 0% 

SM 1.11 and tf2_stocks.inc


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
enderandrew
Junior Member
Join Date: Jun 2020
Old 06-20-2020 , 14:59   SM 1.11 and tf2_stocks.inc
Reply With Quote #1

There are several plugins that won't compile with dev builds of SM 1.11 because tf2_stocks.inc throws errors. Does anyone know how to fix/update tf2_stocks.inc to work with SM 1.11?

Thanks!

SourcePawn Compiler 1.11.0.6570
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2018 AlliedModders LLC

C:\tf2_server\tf\addons\sourcemod\scripting\i nclude\tf2_stocks.inc(331) : error 009: invalid array size (negative, zero or out of bounds)
C:\tf2_server\tf\addons\sourcemod\scripting\i nclude\tf2_stocks.inc(351) : error 010: invalid function or declaration

2 Errors.
enderandrew is offline
enderandrew
Junior Member
Join Date: Jun 2020
Old 06-20-2020 , 15:50   Re: SM 1.11 and tf2_stocks.inc
Reply With Quote #2

cURL.inc
socket.inc
SteamWorks.inc

all throw the same error:

fatal error 196: deprecated syntax; see https://wiki.alliedmods.net/SourcePa...yntax#Typedefs
enderandrew is offline
KillMan
Member
Join Date: Aug 2017
Location: Belarus
Old 06-20-2020 , 16:10   Re: SM 1.11 and tf2_stocks.inc
Reply With Quote #3

Quote:
Originally Posted by enderandrew View Post
cURL.inc
socket.inc
SteamWorks.inc

all throw the same error:

fatal error 196: deprecated syntax; see https://wiki.alliedmods.net/SourcePa...yntax#Typedefs
What's the problem to check that URL?
KillMan is offline
enderandrew
Junior Member
Join Date: Jun 2020
Old 06-20-2020 , 17:47   Re: SM 1.11 and tf2_stocks.inc
Reply With Quote #4

Quote:
Originally Posted by KillMan View Post
What's the problem to check that URL?
I have checked that URL and it is only partially helpful because I'm not really familiar with this code. cURL.inc has a problem at line 152 where I find:

Code:
funcenum CURL_OnComplete
{
	public(Handle:hndl, CURLcode: code),
	public(Handle:hndl, CURLcode: code , any:data),
};
So I pull up that URL:

https://wiki.alliedmods.net/SourcePa...yntax#Typedefs

That tells me I should replace funcenum with typeset and that is easy enough. But that just gives me new errors:

Code:
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(154) : error 001: expected token: "function", but found "public"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(154) : error 001: expected token: "function", but found ","
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(155) : error 001: expected token: "(", but found "public"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(155) : error 001: expected token: "function", but found "-label-"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(155) : error 001: expected token: "function", but found ","
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(155) : fatal error 190: too many error messages on one line
So let's try:

Code:
typeset CURL_OnComplete
{
	function public(Handle hndl, CURLcode code);
	function public(Handle hndl, CURLcode code , any:data);
};
But that is now just giving me a new error I don't know how to fix:

Code:
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(154) : error 122: expected type expression
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(155) : error 122: expected type expression
If someone asks for help, responding with "why don't you simply know how to do this yourself" isn't really helpful.
enderandrew is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-20-2020 , 18:32   Re: SM 1.11 and tf2_stocks.inc
Reply With Quote #5

You've got "public" where the return type should be. It should be either "int" or "void", you'd need to figure out which using examples using CURL_OnComplete - but it's probably void.
__________________
asherkin is offline
enderandrew
Junior Member
Join Date: Jun 2020
Old 06-20-2020 , 21:30   Re: SM 1.11 and tf2_stocks.inc
Reply With Quote #6

These two errors are probably more important to fix given how many plugins depend on tf2_stocks.

C:\tf2_server\tf\addons\sourcemod\scripting\i nclude\tf2_stocks.inc(331) : error 009: invalid array size (negative, zero or out of bounds)
C:\tf2_server\tf\addons\sourcemod\scripting\i nclude\tf2_stocks.inc(351) : error 010: invalid function or declaration

However, trying to fix cURL, socket and SteamWorks is just opening a larger can of worms. I assume someone who knew what they were doing could knock this out briefly but sadly I don't.

cURL.inc - https://pastebin.com/ZgVEd5hQ

socket.inc - https://pastebin.com/MW66KYkm

SteamWorks.inc - https://pastebin.com/TR9p8z9U

Code:
C:\tf2_server\tf\addons\sourcemod\scripting>spcomp updater
SourcePawn Compiler 1.11.0.6570
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2018 AlliedModders LLC

C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(168) : error 139: could not find type "last_sent_dataSize"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(169) : error 139: could not find type "last_sent_dataSize"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(182) : error 139: could not find type "dataSize"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(183) : error 139: could not find type "dataSize"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(203) : error 139: could not find type "bytes"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(203) : error 139: could not find type "nmemb"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(204) : error 139: could not find type "bytes"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(204) : error 139: could not find type "nmemb"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(207) : error 139: could not find type "bytes"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(207) : error 139: could not find type "nmemb"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(208) : error 139: could not find type "bytes"
C:\tf2_server\tf\addons\sourcemod\scripting\include\cURL.inc(208) : error 139: could not find type "nmemb"
C:\tf2_server\tf\addons\sourcemod\scripting\include\socket.inc(221) : error 139: could not find type "remotePort"
C:\tf2_server\tf\addons\sourcemod\scripting\include\socket.inc(240) : error 139: could not find type "dataSize"
C:\tf2_server\tf\addons\sourcemod\scripting\include\socket.inc(282) : error 139: could not find type "errorType"
C:\tf2_server\tf\addons\sourcemod\scripting\include\socket.inc(282) : error 139: could not find type "errorNum"
updater/plugins.sp(41) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(41) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(55) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(55) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(84) : warning 213: tag mismatch (expected "int", got "DataPackPos")
updater/plugins.sp(87) : warning 213: tag mismatch (expected "int", got "DataPackPos")
updater/plugins.sp(90) : warning 213: tag mismatch (expected "int", got "DataPackPos")
updater/plugins.sp(93) : warning 213: tag mismatch (expected "int", got "DataPackPos")
updater/plugins.sp(128) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(128) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(135) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(135) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(142) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(142) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(149) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(149) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(156) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/plugins.sp(156) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(41) : warning 213: tag mismatch (expected "int", got "DataPackPos")
updater/download_socket.sp(44) : warning 213: tag mismatch (expected "int", got "DataPackPos")
updater/download_socket.sp(47) : warning 213: tag mismatch (expected "int", got "DataPackPos")
updater/download_socket.sp(50) : warning 213: tag mismatch (expected "int", got "DataPackPos")
updater/download_socket.sp(62) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(62) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(73) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(73) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(104) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(104) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(134) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(134) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(161) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(161) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(166) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(166) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(193) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_socket.sp(193) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download_steamworks.sp(12) : error 017: undefined symbol "SteamWorks_CreateHTTPRequest"
updater/download_steamworks.sp(13) : error 017: undefined symbol "SteamWorks_SetHTTPRequestHeaderValue"
updater/download_steamworks.sp(14) : error 017: undefined symbol "SteamWorks_SetHTTPRequestHeaderValue"
updater/download_steamworks.sp(15) : error 017: undefined symbol "SteamWorks_SetHTTPCallbacks"
updater/download_steamworks.sp(16) : error 017: undefined symbol "SteamWorks_SetHTTPRequestContextValue"
updater/download_steamworks.sp(17) : error 017: undefined symbol "SteamWorks_SendHTTPRequest"
updater/download_steamworks.sp(27) : error 017: undefined symbol "k_EHTTPStatusCode200OK"
updater/download_steamworks.sp(29) : error 017: undefined symbol "SteamWorks_WriteHTTPResponseBodyToFile"
updater/download.sp(64) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download.sp(64) : warning 213: tag mismatch (expected "DataPackPos", got "int")
updater/download.sp(70) : error 017: undefined symbol "STEAMWORKS_AVAILABLE"
updater/download.sp(83) : error 017: undefined symbol "STEAMWORKS_AVAILABLE"

Compilation aborted.
26 Errors.
enderandrew is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Old 06-21-2020 , 04:35   Re: SM 1.11 and tf2_stocks.inc
Reply With Quote #7

It looks like you are hitting https://github.com/alliedmodders/sourcemod/pull/1154. tf2_stocks.inc does not compile on 1.11 without that fix.

As for the third-party includes, try using the ones with updated syntax from https://github.com/JoinedSenses/Sour...master/include.
__________________

Last edited by DJ Tsunami; 06-21-2020 at 04:38.
DJ Tsunami is offline
enderandrew
Junior Member
Join Date: Jun 2020
Old 06-21-2020 , 06:07   Re: SM 1.11 and tf2_stocks.inc
Reply With Quote #8

Quote:
Originally Posted by DJ Tsunami View Post
It looks like you are hitting https://github.com/alliedmodders/sourcemod/pull/1154. tf2_stocks.inc does not compile on 1.11 without that fix.

As for the third-party includes, try using the ones with updated syntax from https://github.com/JoinedSenses/Sour...master/include.
Thanks! That fix works for tf2_stocks.inc. I'll take a look at those includes.
enderandrew 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 02:37.


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