Maximum array size?

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
lostProfitssssArrgh
Posts: 161
Joined: Tue, 22. Aug 17, 13:14

Maximum array size?

Post by lostProfitssssArrgh » Tue, 22. Aug 17, 18:34

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

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Tue, 22. Aug 17, 18:50

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.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

lostProfitssssArrgh
Posts: 161
Joined: Tue, 22. Aug 17, 13:14

Post by lostProfitssssArrgh » Tue, 22. Aug 17, 20:09

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

line 20:

Code: Select all

$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.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 29. Aug 17, 15:36

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

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”