|
Veteran Member
Join Date: Aug 2013
Location: Canada
|
01-10-2017
, 17:34
Re: Writing an module.
|
#2
|
1) Correct, general AMXX development requires AMXX source, MM source and HLSDK
2) Yes, only using API of AMXX allows you to only require AMXX source.
Note: Your native runs the risk of corrupting memory for the following reason:
sizeof() is a constexpr, what this means is that it's value is obtained at compile time of your module, so basically, your for loop iterates the values of 0, 1, 2, 3 (pointers are 4 bytes long, aka 32 bit integers, on 32bit machines), you have no guarantee input array is 16 bytes long (AMXX cells are 32-bit integers, 4 bytes, multiplied by 4 for num indexes your iterating), you 100% must have a parameter in your native definition to pass array's size in PAWN and use that param in your callback.
__________________
|
|
|
|