This is my first "How To", so go easy on me.
this will happen when you remove a sound/model from your zombieplague.ini because you may not want the sound/model.
Never leave a string with no path.
Like this:
Code:
WIN ZOMBIES = //You removed this because you didnt want it.
WIN HUMANS = Infinity/win_human.wav , Infinity/win_humans3.wav
WIN NO ONE = Infinity/roundclear.wav
If you follow this "How To" correctly, you can remove it like this:
Code:
WIN HUMANS = Infinity/win_human.wav , Infinity/win_humans3.wav
WIN NO ONE = Infinity/roundclear.wav
Thats an example. Now lets move futher to the fix.
Fix for 1st sound in zombieplauge.ini:
Step 1. Open your zombie_plague40.sma
Step 2. Search for the name of the sound you had removed. in my case its "WIN ZOMBIES" and this is the first sound in zombieplague.ini
Step 3. Now you will see this:
PHP Code:
case SECTION_SOUNDS:
{
if (equal(key, "WIN ZOMBIES"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(sound_win_zombies, key)
ArrayPushCell(sound_win_zombies_ismp3, equal(key[strlen(key)-4], ".mp3") ? 1 : 0)
}
}
else if (equal(key, "WIN HUMANS"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(sound_win_humans, key)
ArrayPushCell(sound_win_humans_ismp3, equal(key[strlen(key)-4], ".mp3") ? 1 : 0)
}
}
Now, just remove WIN_ZOMBIES code. so it looks like this:
Notice: don't forget to change
PHP Code:
else if (equal(key, "WIN HUMANS"))
To:
PHP Code:
if (equal(key, "WIN HUMANS"))
PHP Code:
case SECTION_SOUNDS:
{
if (equal(key, "WIN HUMANS"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(sound_win_humans, key)
ArrayPushCell(sound_win_humans_ismp3, equal(key[strlen(key)-4], ".mp3") ? 1 : 0)
}
}
Step 3. Now, save the sma, and compile it.
Step 4. go to your zombieplague.ini and remove this line:
Code:
WIN ZOMBIES = Infinity/blabla.wav
Step 5. Done.
-------------------------------------------------------------------
Fix for 2nd/3rd/4th etc, sound:
Code:
WIN ZOMBIES = first sound.
WIN HUMANS = Second sound, this is the one we are going to fix.
WIN NO ONE = Third sound
Thats an example. Now lets move futher to the fix for 2nd and more sounds.
The fix. if this is the SECOND and MORE sounds in your zombieplauge.ini:
Step 1. Open your zombie_plague40.sma
Step 2. Search for the name of the sound you had removed. in my case its "WIN HUMANS" and this is the first sound in zombieplague.ini
Step 3. Now, this time, you will see this:
PHP Code:
case SECTION_SOUNDS:
{
if (equal(key, "WIN ZOMBIES"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(sound_win_zombies, key)
ArrayPushCell(sound_win_zombies_ismp3, equal(key[strlen(key)-4], ".mp3") ? 1 : 0)
}
}
else if (equal(key, "WIN HUMANS"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(sound_win_humans, key)
ArrayPushCell(sound_win_humans_ismp3, equal(key[strlen(key)-4], ".mp3") ? 1 : 0)
}
}
else if (equal(key, "WIN NO ONE"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(sound_win_no_one, key)
ArrayPushCell(sound_win_no_one_ismp3, equal(key[strlen(key)-4], ".mp3") ? 1 : 0)
}
}
Now, just remove WIN HUMANS code. so it looks like this:
PHP Code:
case SECTION_SOUNDS:
{
if (equal(key, "WIN ZOMBIES"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(sound_win_zombies, key)
ArrayPushCell(sound_win_zombies_ismp3, equal(key[strlen(key)-4], ".mp3") ? 1 : 0)
}
}
else if (equal(key, "WIN NO ONE"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(sound_win_no_one, key)
ArrayPushCell(sound_win_no_one_ismp3, equal(key[strlen(key)-4], ".mp3") ? 1 : 0)
}
}
Step 3. Now, save the sma, and compile it.
Step 4. go to your zombieplague.ini and remove this line:
Code:
WIN HUMANS = Infinity/blabla.wav
Step 5. Done?, alright.
__________________