Does anyone know why I get compile errors when I try to use the function:
void bz_setMaxWaitTime ( float time );
used in the following way:
bz_setMaxWaitTime ( 0.5 );
?
The compile errors I get are as follows:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2365: 'bz_setMaxWaitTime' : redefinition; previous definition was 'function'
c:\Source\bzflag\include\bzfsAPI.h(1000) : see declaration of 'bz_setMaxWaitTime'
warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data
void bz_setMaxWaitTime ( float time ) function
- LouMan
- Chief Sgt. of Cartography
- Posts: 338
- Joined: Mon Jan 31, 2005 3:05 am
- Location: Michigan, USA
Thanks so much! I think I was also using it in the wrong context as well - I moved the function into my event code and it seems to work ok now. (see plugin releases - wwzones)
BTW - I used your (JeffM) code for flagStay as a base for the new plugin - I hope that it's ok. I gave credit where I could.
Again, thanks
BTW - I used your (JeffM) code for flagStay as a base for the new plugin - I hope that it's ok. I gave credit where I could.
Again, thanks
the bug was the fact that the word "time" is defined as a type in windows. you should be able to call that function from anywhere.
int 2.0.x I just fixed that one function, in 2.1.x I changed every instance of the word time in the API to be something else, so we should not have the problem again.
I'm glad the code was of some use to you, I'm always happy to see people extend thing I do.
int 2.0.x I just fixed that one function, in 2.1.x I changed every instance of the word time in the API to be something else, so we should not have the problem again.
I'm glad the code was of some use to you, I'm always happy to see people extend thing I do.
JeffM