EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
Maximum array size?
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
lostProfitssssArrgh





Joined: 22 Aug 2017



PostPosted: Tue, 22. Aug 17, 18:34    Post subject: Maximum array size? Reply with quote Print

Hello!

Is there a size limit for arrays in MSCI scripts? It seems i can only get 200 elements stored into one.

Alternatively, i'm splitting a string into said array. Could it be that the original string is too large? If so, what is the max character count..?

Thanks a lot,
LPA

Back to top
View user's profile Send private message
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 20392 on topic

Thank you for registering your game
PostPosted: Tue, 22. Aug 17, 18:50    Post subject: Reply with quote Print

lostProfitssssArrgh wrote:
Is there a size limit for arrays in MSCI scripts? It seems i can only get 200 elements stored into one.


Just the usual 2 billion (2^31-1) limit. So 200 elements shouldn't be a problem.

lostProfitssssArrgh wrote:
Alternatively, i'm splitting a string into said array. Could it be that the original string is too large? If so, what is the max character count..?


In several instances a limit of 6017 characters can be observed. Anything above that will cause problems, whereby these problems usually only refer to displaying the text in some form.


_________________
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton
Back to top
View user's profile Send private message Visit poster's website
lostProfitssssArrgh





Joined: 22 Aug 2017



PostPosted: Tue, 22. Aug 17, 20:09    Post subject: Reply with quote Print

I think my problem comes from Lib.Gen.String.Seperator.xml.

line 20:
Code:

$CurrentString = get substring of $CurrentString offset=$Pos length=9999


With the length value as it is, the returned array has only 200 elements.

setting length to 99999 returns the array with all 225 elements.

Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20468 on topic
Location: London
Thank you for registering your game
PostPosted: Tue, 29. Aug 17, 15:36    Post subject: Reply with quote Print

Looks like that scripts uses a hard coded length, rather than getting the actual string length. So longer strings will have parts missing


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Thu, 23. Nov 17, 20:41

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.14790 seconds, sql queries = 18