Raised This Month: $ Target: $400
 0% 

error 008: must be a constant expression


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-26-2007 , 03:41   Re: error 008: must be a constant expression
Reply With Quote #2

Oh no. >.> ?!

1.register_plugin(....) should be in plugin_init()
2.3D array :S...why ?!
3.Code should look like this :

Code:
#include <amxmodx>
 
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"
 
#define SOUNDS_NUMBER 4
 
stock const sound_test[SOUNDS_NUMBER][/*max len*/] = {
 
 "csound/1.wav",
 "csound/2.wav",
 "csound/3.wav",
 "csound/4.wav"
}
 
public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR);
}
 
public plugin_precache()
{
 for(new z = 0 ; z < sizeof sound_test ; z++)
 {
  precache_sound(sound_test[z]);
 }
}
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode