Raised This Month: $12 Target: $400
 3% 

warning 237: coercing functions to and from primitives is unsupported and will be rem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
enderandrew
Senior Member
Join Date: Jun 2020
Old 07-15-2020 , 18:29   warning 237: coercing functions to and from primitives is unsupported and will be rem
Reply With Quote #1

Code:

https://pastebin.com/N0c4NeFu

Produces three warnings:

Code:
SourcePawn Compiler 1.10.0.6490
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2018 AlliedModders LLC

sodstats\natives.sp(56) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
sodstats\natives.sp(121) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
sodstats\natives.sp(174) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
I understand why this is problematic, but I don't know the best way to fix this.
enderandrew is offline
Scag
AlliedModders Donor
Join Date: May 2017
Location: Crashing Hale
Old 07-16-2020 , 11:15   Re: warning 237: coercing functions to and from primitives is unsupported and will be
Reply With Quote #2

You're looking for ReadPackFunction/DataPack.ReadFunction.

Function types and typedef/typeset types will eventually(tm) have a different size than a cell, so although the behavior will work at the moment, it's warning you that one day it won't.
__________________
Over-engineering is underrated.

GitHub
BTC
ETH

Retired
Scag is offline
enderandrew
Senior Member
Join Date: Jun 2020
Old 07-16-2020 , 11:58   Re: warning 237: coercing functions to and from primitives is unsupported and will be
Reply With Quote #3

Quote:
Originally Posted by Ragenewb View Post
You're looking for ReadPackFunction/DataPack.ReadFunction.

Function types and typedef/typeset types will eventually(tm) have a different size than a cell, so although the behavior will work at the moment, it's warning you that one day it won't.
Thank you very much!
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 15:46.


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