Hooka
That Guy!
Ok, I'm getting this error:
error: variable-size type declared outside of any function
And I'm pretty sure it's because I changed a #define into an int because I need it to change at runtime, only problem is that it's used as an array subscript outside of a function (atleast I think that's what I think this is, the #define changed to an int is NUMSNDCHUNKS)
extern byte *audiosegs[NUMSNDCHUNKS];
Now could I do something like:
#define NUMSNDCHUNKS
#define WL6_NUMSNDCHUNKS 288
#define SOD_NUMSNDCHUNKS 267
void blabla(){
if (wolftype == WOLF){
NUMSNDCHUNKS = WL6_NUMSNDCHUNKS;
}else{
NUMSNDCHUNKS = SOD_NUMSNDCHUNKS;
}
}
Or is there anyway to do this?
I'll give it a couple tries when I get home but I just though I'd ask and see if anybody thought this was a sane way....
Edit: thanks pea, I had thought of that first but then I wondered if it would still complain about the int. I'll give this a try and see where I stand after that
Unfortunately that doesn't seem to be an option (gives the same error) I've gotten rid of most of the errors so far (used a sneaky yet horrible way to do it though) but I've got one left and have no clue how I'm giong to get around it :S So close yet so far, time to sit here and think I guess...
error: variable-size type declared outside of any function
And I'm pretty sure it's because I changed a #define into an int because I need it to change at runtime, only problem is that it's used as an array subscript outside of a function (atleast I think that's what I think this is, the #define changed to an int is NUMSNDCHUNKS)
extern byte *audiosegs[NUMSNDCHUNKS];
Now could I do something like:
#define NUMSNDCHUNKS
#define WL6_NUMSNDCHUNKS 288
#define SOD_NUMSNDCHUNKS 267
void blabla(){
if (wolftype == WOLF){
NUMSNDCHUNKS = WL6_NUMSNDCHUNKS;
}else{
NUMSNDCHUNKS = SOD_NUMSNDCHUNKS;
}
}
Or is there anyway to do this?
I'll give it a couple tries when I get home but I just though I'd ask and see if anybody thought this was a sane way....
Edit: thanks pea, I had thought of that first but then I wondered if it would still complain about the int. I'll give this a try and see where I stand after that
Unfortunately that doesn't seem to be an option (gives the same error) I've gotten rid of most of the errors so far (used a sneaky yet horrible way to do it though) but I've got one left and have no clue how I'm giong to get around it :S So close yet so far, time to sit here and think I guess...