AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   warning 237: coercing functions to and from primitives is unsupported and will be rem (https://forums.alliedmods.net/showthread.php?t=326032)

enderandrew 07-15-2020 18:29

warning 237: coercing functions to and from primitives is unsupported and will be rem
 
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.

Scag 07-16-2020 11:15

Re: warning 237: coercing functions to and from primitives is unsupported and will be
 
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.

enderandrew 07-16-2020 11:58

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

Originally Posted by Ragenewb (Post 2710352)
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!


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

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