SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 11/03/2018, 12:34 AM   #11
SyS
High-roller
 
SyS's Avatar
 
Join Date: Oct 2015
Posts: 1,984
Reputation: 461
Default Re: About string size cell numbers.

Quote:
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 online now   Reply With Quote
Old 05/05/2018, 10:46 PM   #12
AmigaBlizzard
Huge Clucker
 
Join Date: Jul 2012
Posts: 317
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
Reply

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 12: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 07:11 AM
how to compare string cell to character? HurtLocker Scripting Help 5 22/05/2013 08:41 PM
Convert string with numbers into numbers only? The_Moddler Help Archive 6 17/10/2010 09:20 AM
fatal error 111: user error: Unkown cell size indra Help Archive 4 11/08/2009 10:27 AM


All times are GMT. The time now is 02:09 PM.


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