SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Discussion

Thread Tools Display Modes
Old 11/03/2018, 01:34 AM   #11
SyS's Avatar
Join Date: Oct 2015
Posts: 1,948
Reputation: 504
Default Re: About string size cell numbers.

Originally Posted by VeryTallMidget View Post
Is it possible to create dynamic array that sets the size from the: sizeof(PlayerName) ?
Pawn doesn't support dynamic allocation. There are some tricky library like ymalloc or any vector plugin can do this. But as far as I know dynamic allocation is not necessary in samp scripting.
SyS is offline   Reply With Quote
Old 05/05/2018, 11:46 PM   #12
Huge Clucker
Join Date: Jul 2012
Posts: 320
Reputation: 60
Default Re: About string size cell numbers.

It's the same as going to buy a 2-seat sofa.
When you use a Smart vehicle, the sofa won't fit in the trunk of that Smart. Same as trying to store a playername in a string of size 5, it won't fit in there as a playername can be up to 24 chars long.
On the other hand, using a string of size 128 to store that playername (which is max 24 chars long), is the same as renting a truck + trailer (like the GTA Roadtrain + Article trailer) to buy that sofa, while you would do fine with your car and a trailer.
Using that Roadtrain+trailer will do the job too, but it's just overkill.
AmigaBlizzard is offline   Reply With Quote

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i keep zero's in a string with numbers? AIped Scripting Help 3 30/06/2014 01:48 PM
[Tool/Web/Other] String checker [length, block size, breaks & tabs] - Is your string size correct? Sinner Tools and Files 13 17/09/2013 08:11 AM
how to compare string cell to character? HurtLocker Scripting Help 4 22/05/2013 09:41 PM
Convert string with numbers into numbers only? The_Moddler Help Archive 6 17/10/2010 10:20 AM
fatal error 111: user error: Unkown cell size indra Help Archive 4 11/08/2009 11:27 AM

All times are GMT. The time now is 10:32 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.