Can I Add Value To An Array
#3

You certainly cannot if you declare your array like that. If you declare it like this instead then you can :
Quote:

new arr[50] = {1, 3, 5, 7};

It is mandatory in pawn to know array size before compilation therefore dynamic memory allocation is not possible through pawn directly.

You can use plugin if you really want dynamic memory allocation, here is one i found https://sampforum.blast.hk/showthread.php?tid=364285
Reply


Messages In This Thread
Can I Add Value To An Array - by Novacaine - 29.03.2017, 16:18
Re: Can I Add Value To An Array - by Toroi - 29.03.2017, 16:21
Re: Can I Add Value To An Array - by BroZeus - 29.03.2017, 16:30
Re: Can I Add Value To An Array - by Novacaine - 29.03.2017, 16:41

Forum Jump:


Users browsing this thread: 1 Guest(s)