Raised This Month: $32 Target: $400
 8% 

fatal error 196: deprecated syntax; with funcenum


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 05-14-2018 , 10:19   fatal error 196: deprecated syntax; with funcenum
Reply With Quote #1

Have a problem with last build with this steamworks.inc

Code:
Compiling get5.sp...
SourcePawn Compiler 1.10.0.6266
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2017 AlliedModders LLC

/home/kgb1st/CLASSIC/csgo/addons/sourcemod/scripting/include/SteamWorks.inc(248) : fatal error 196: deprecated syntax; see https://wiki.alliedmods.net/SourcePawn_Transitional_Syntax#Typedefs

Compilation aborted.Code size:            44952 bytes
Data size:             7128 bytes
Stack/heap size:      16384 bytes
Total requirements:   68464 bytes
Problem with https://github.com/KyleSanderson/Ste...SteamWorks.inc in
Code:
funcenum 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)
};

funcenum SteamWorksHTTPHeadersReceived
{
	public(Handle:hRequest, bool:bFailure),
	public(Handle:hRequest, bool:bFailure, any:data1),
	public(Handle:hRequest, bool:bFailure, any:data1, any:data2)
};

funcenum 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)
};
How I can sove it? I've read wiki, but nothing can to do with these funcenum

Last edited by ZASTRELIS; 05-14-2018 at 10:43.
ZASTRELIS is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 05-14-2018 , 11:51   Re: fatal error 196: deprecated syntax; with funcenum
Reply With Quote #2

You definitely didn’t look at the wiki link or didn’t bother to read.
Dr!fter is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 05-15-2018 , 00:14   Re: fatal error 196: deprecated syntax; with funcenum
Reply With Quote #3

Quote:
Originally Posted by Dr!fter View Post
You definitely didn’t look at the wiki link or didn’t bother to read.
Typedefs

Function tags and function enums have been deprecated in favor of a more modern syntax. Currently, they can still only create tag names for functions. Future versions will support arbitrary types.

Upgrading both functags and funcenums is simple. Below are two examples:
Code:
functag public Action:SrvCmd(args);
 
funcenum Timer {
  Action:public(Handle:Timer, Handle:hndl),
  Action:public(Handle:timer),
};
Now, this becomes:
Code:
typedef SrvCmd = function Action (int args);
 
typeset Timer {
  function Action (Handle timer, Handle hndl);
  function Action (Handle timer);
};
I tried, but I can't do it..

I've 3 function in SteamWorks at the one if its native. So I can't understand how it must be work

Code:
funcenum 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) }; funcenum SteamWorksHTTPHeadersReceived {     public(Handle:hRequest, bool:bFailure),     public(Handle:hRequest, bool:bFailure, any:data1),     public(Handle:hRequest, bool:bFailure, any:data1, any:data2) }; funcenum 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) }; native bool:SteamWorks_SetHTTPCallbacks( Handle:hHandle,     SteamWorksHTTPRequestCompleted:fCompleted = INVALID_FUNCTION,     SteamWorksHTTPHeadersReceived:fHeaders = INVALID_FUNCTION,     SteamWorksHTTPDataReceived:fData = INVALID_FUNCTION, Handle:hCalling = INVALID_HANDLE);

Last edited by ZASTRELIS; 05-15-2018 at 00:20.
ZASTRELIS is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 05-15-2018 , 03:25   Re: fatal error 196: deprecated syntax; with funcenum
Reply With Quote #4

PHP Code:
typeset SteamWorksHTTPRequestCompleted
{
    function 
void (Handle hRequestbool bFailurebool bRequestSuccessfulEHTTPStatusCode eStatusCode);
    function 
void (Handle hRequestbool bFailurebool bRequestSuccessfulEHTTPStatusCode eStatusCodeany data1);
    function 
void (Handle hRequestbool bFailurebool bRequestSuccessfulEHTTPStatusCode eStatusCodeany data1any data2);
};

typeset SteamWorksHTTPHeadersReceived
{
    function 
void (Handle hRequestbool bFailure);
    function 
void (Handle hRequestbool bFailureany data1);
    function 
void (Handle hRequestbool bFailureany data1any data2);
};

typeset SteamWorksHTTPDataReceived
{
    function 
void (Handle hRequestbool bFailureint offsetint bytesreceived);
    function 
void (Handle hRequestbool bFailureint offsetint bytesreceivedany data1);
    function 
void (Handle hRequestbool bFailureint offsetint bytesreceivedany data1any data2);
}; 
Kailo is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 05-15-2018 , 11:09   Re: fatal error 196: deprecated syntax; with funcenum
Reply With Quote #5

Quote:
Originally Posted by Kailo View Post
PHP Code:
typeset SteamWorksHTTPRequestCompleted
{
    function 
void (Handle hRequestbool bFailurebool bRequestSuccessfulEHTTPStatusCode eStatusCode);
    function 
void (Handle hRequestbool bFailurebool bRequestSuccessfulEHTTPStatusCode eStatusCodeany data1);
    function 
void (Handle hRequestbool bFailurebool bRequestSuccessfulEHTTPStatusCode eStatusCodeany data1any data2);
}; 
void? Really, why?

Code:
/*funcenum SteamWorksHTTPBodyCallback {     public(const String:sData[]),     public(const String:sData[], any:value),     public(const data[], any:value, datalen) };*/

Can you help me with advice? My problem with understanding in differences of const String:sData[] and const data[]
As I mean, const String:sData[] it's a simple dynamic string, and const data[] it's as dynamic massive?

Last edited by ZASTRELIS; 05-15-2018 at 11:16.
ZASTRELIS is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 05-15-2018 , 18:40   Re: fatal error 196: deprecated syntax; with funcenum
Reply With Quote #6

A String:[] is an array of chars. A regular array would be a string of regular cells. Different data types but both are arrays. If the concept of data types or arrays confuses you you should read the wiki or do a bit of research, there are a lot of good resources out there.
hmmmmm is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 05-16-2018 , 00:56   Re: fatal error 196: deprecated syntax; with funcenum
Reply With Quote #7

Quote:
Originally Posted by hmmmmm View Post
A String:[] is an array of chars. A regular array would be a string of regular cells. Different data types but both are arrays. If the concept of data types or arrays confuses you you should read the wiki or do a bit of research, there are a lot of good resources out there.
okay, thx. very usefull for me.
ZASTRELIS is offline
Reply



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 22:41.


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