[ANY] New way to store data into the char array
That code use the pawn emit which originally not exist in sm compiler
More info about #emit here Regards to komashchenko for restoring some removed features to a compiler and for the code below, which show a simple example of what scripters can do with #emit, myself found it very useful for menu info , when you need to store some data like "4 5.0 -1" and now I don't use FormatEx and ExploadString and just simply send data via parameters and after extracting them back. Remember that any formatting on that stream char will break it, so only use the two function below, I hope the original sm once will return some of that kind of features because they might be useful in some situation, for example when you need to get the number of arguments which use sent to (any ...) Use can send data like int, float by the AnyToStream(sBuf, 5, 5.0, 3, 5, 7) and get back using StreamToAny(sBuf, iData) where iData is the any[] Minimum size of char buffer array should be not less then args * 4 + 1 PHP Code:
Spoiler
GitHub |
Re: [ANY] New way to store data into the char array
Seems interesting, but if I understood this right... then you can just use DataPacks for passing information?
|
Re: [ANY] New way to store data into the char array
Quote:
It will work with datapack is well PHP Code:
|
Re: [ANY] New way to store data into the char array
#emit was removed from spcomp because it made it impossible to safely make many internal improvements, and it had never been used in any released plugin. Using a modified version of spcomp means your plugins will very likely not be compatible with future versions of SourceMod.
|
Re: [ANY] New way to store data into the char array
Yeah... can't believe I even need to say it, but don't do this. All pain and no gain.
|
Re: [ANY] New way to store data into the char array
Quote:
|
Re: [ANY] New way to store data into the char array
Quote:
|
Re: [ANY] New way to store data into the char array
Quote:
|
Re: [ANY] New way to store data into the char array
Quote:
|
All times are GMT -4. The time now is 09:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.