Very long string
#1

I need best way to deal with string long [90000 char] what will be

"best way" with "minimum memory request" to do it?

Idea`s are welcome.
Reply
#2

1 word for that: Impossible.

Max string size in sa-mp is 1024...
Reply
#3

Quote:
Originally Posted by ricardo178
Посмотреть сообщение
1 word for that: Impossible.

Max string size in sa-mp is 1024...
pawn Код:
new szFlngStr[ ] = { "your long txt" };

ShowPlayerDialog( playerid, x,x,"caption", szFlngStr, "b1", "b2"); // we using the long str here :)
I believe it is somehow possible like the above code. I would show you in more detail but sorry Im on phone.

-FalconX
Reply
#4

Quote:
Originally Posted by ricardo178
Посмотреть сообщение
1 word for that: Impossible.

Max string size in sa-mp is 1024...
Please don't say things like that when you have no idea what your talking about.

EDIT: Why would you want to store a very long string?

EDIT2: Anyways, the best way for memory consumption for any variable in PAWN is to make it a local variable and not global, because it will be deleted when it goes out of scope, if it is local. And global variables stay in memory until the program closes.

Just make the array as large as you need it to be, and if you get no errors or warnings when you compile/run you should be OK (as long as its not too big). Just avoid using global variables whenever possible especially large arrays.
Reply
#5

While it's entirely possible, I could not imagine a SINGLE occurance where this would be useful.

Good luck typing all that with useful things..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)