Array dimensions
I have this code to add a const array to defined array but it shows that dimensions don't match
PHP Code:
|
Re: Array dimensions
Explain better what you are trying to do and attach the whole plugin that is causing the error.
|
Re: Array dimensions
Why double [ ] [ ] ? Shouldnt it be unidimensional array?:
new const ZOMBIE_PAIN[ ] Instead of new const ZOMBIE_PAIN[ ][ ] |
Re: Array dimensions
Quote:
|
Re: Array dimensions
Quote:
The issue is that he copies a 2d array to 1d , but i see that he has only one string so he doesnt need 2d array. |
Re: Array dimensions
Quote:
Code:
|
Re: Array dimensions
I need 2d array because I'll add more sounds later on.
|
Re: Array dimensions
Quote:
|
Re: Array dimensions
In fact that's how I've done it :D, this const is for default zombies if no classes are registered.
|
Re: Array dimensions
Quote:
ZOMBIE_PAIN[0]="s/zombie/pain.wav" ZOMBIE_PAIN[1]="s/zombie/pain2.wav" and so on... so you should change : ArraySetArray( z_b_pain, index, ZOMBIE_PAIN, ArraySize( ZOMBIE_PAIN ) ); to: ArraySetArray( z_b_pain, index, ZOMBIE_PAIN[index], ArraySize( ZOMBIE_PAIN[index] ) ); PHP Code:
|
| All times are GMT -4. The time now is 09:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.