Raised This Month: $ Target: $400
 0% 

error 008: must be a constant expression


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Drak
Veteran Member
Join Date: Jul 2005
Old 08-26-2007 , 07:48   Re: error 008: must be a constant expression
Reply With Quote #4

Quote:
Originally Posted by l4ulwtlln View Post
1. dont have to be, it works in plugin_precache if ur only registering the plugin
2. cuz i want it to be dynamic, so when i change SoundNumber to another number, it will be another set of sounds
3. that wouldnt make it dynamic anymore
You can't do it the way you want to.

Example:
Code:
new SoundNumber = 4; #define MAX_ALLOWED 64 new Sound_Test[SoundNumber][MAX_ALLOWED] = { "csound/1.wav","csound/2.wav","csound/3.wav","csound/4.wav" }

Would NOT work, you would get "Must be a constant expression" error.

This would work:
Code:
new Sound_Test[4][64] = { "csound/1.wav","csound/2.wav","csound/3.wav","csound/4.wav" }

You can't use variables and such, like you where.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
 



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