### ParticleData((null)) times[2] < times[1]

Scripting questions, discussions, etc

#### ParticleData((null)) times[2] < times[1]

Duion
Posts: 1004
Joined: Sun Feb 08, 2015 1:51 am

I get a bunch of those in my console log as warnings, I think it means that times[2] is smaller than times [1] in some particle datablock, which should not be the case, since the time can only increase.
The problem is now, that I checked everyone of my particle datablocks, but in none of them times[2] was smaller then times[1].
What I also wonder is why ParticleData has no name and is logged with "null".

#### Re: ParticleData((null)) times[2] < times[1]

Nils
Posts: 159
Joined: Thu Feb 05, 2015 3:32 am

Shouldn't be too worried about it.

Anyway, if I remember correctly you'll get the same error when for example sizes[3] or colors[3] exists in the datablock, but not times[3].

#### Re: ParticleData((null)) times[2] < times[1]

Azaezel
Posts: 395
Joined: Tue Feb 03, 2015 9:50 pm

It's saying you labeled one of your times entries later than one following it for a particle emitter iirc.

#### Re: ParticleData((null)) times[2] < times[1]

Duion
Posts: 1004
Joined: Sun Feb 08, 2015 1:51 am

I changed every particle datablock, so that everything is in order, like colors[0]-colors[3], then sizes, then times and made sure that each number has all 3 states, but the error still happens.

#### Re: ParticleData((null)) times[2] < times[1]

Nils
Posts: 159
Joined: Thu Feb 05, 2015 3:32 am

Correction: I used the word "error" which is of course not correct. It's a "warning"
but the error still happens.
Perhaps I don't remember it correctly then

I think it has something to do with the last time[x] needing to be "1". If you for example have times[1] defined as "1" and [2] is not defined, but you added size[2] and/or color[2] then it would assume there's a time[2]. But if both are "1" it's incorrect because the time already passed at times[1].

But I could of course had another brain fart because I'm way too busy checking this out.
(I should be even way too busy to write this reply at all)

The safest way would be to go with what @ Azaezel wrote

#### Re: ParticleData((null)) times[2] < times[1]

Duion
Posts: 1004
Joined: Sun Feb 08, 2015 1:51 am

I checked all of my particle datablocks, so that this does never occur, as well as that times[2] is never smaller than times[1] etc but the warning is still there.

#### Re: ParticleData((null)) times[2] < times[1]

Caleb
Posts: 18
Joined: Tue Feb 10, 2015 5:01 pm
The warning is indeed generated when one time is greater than a previous time. Looking in the "onAdd" of particle.cpp (around line 429) shows:
times[0] = 0.0f;
for (U32 i = 1; i < 4; i++) {
if (times < times[i-1]) {
Con::warnf(ConsoleLogEntry::General, "ParticleData(%s) times[%d] < times[%d]", getName(), i, i-1);
times = times[i-1];
}
}

The fact that you've checked to make sure this is not the case already is strange though. A little while ago I was having issues with some custom particle DataBlocks, and no matter what I edited no changes seemed to happen. It took me far longer than I'd care to admit to figure out that I had particle DataBlocks defined into different script files. So basically the file that I was editing was different than where the particle editor was saving changes to. Perhaps you have a stray particleData being defined somewhere else that you haven't checked? Otherwise I'm not sure why you're still getting this warning.

#### Re: ParticleData((null)) times[2] < times[1]

Duion
Posts: 1004
Joined: Sun Feb 08, 2015 1:51 am

I used the search all files function to search for "particleData" in my whole project, I don't think I missed any one of them.
I get the warning like 3-4 times, already tried to not executed some particles to see if the warnings get less, but no success so far and I did not have the patience to repeat that for every particle in the game.

#### Who is online

Users browsing this forum: No registered users and 1 guest