Bug 3393 - The compiler fails to do backwards-detection of constant variables.
The compiler fails to do backwards-detection of constant variables.
Status: RESOLVED WORKSFORME
Product: AMX Mod X
Classification: Unclassified
Component: AMXx Studio
trunk
PC Windows
: P3 major
Assigned To: amxmodx-bugs@alliedmods.net
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-04 15:02 PST by silencer191
Modified: 2013-06-17 05:17 PDT (History)
3 users (show)

See Also:


Attachments

Description silencer191 2008-11-04 15:02:38 PST
The following plugin cannot be compiled.
The compiler says that the second line "Must be
a constant expression", although the variable
MAX_MENU_UPDATE_RATE is constant.


#include <amxmodx>

const Float:MAX_MENU_UPDATE_RATE=10.0; // In updates per second
const Float:MIN_MENU_UPDATE_DELAY=1.0/MAX_MENU_UPDATE_RATE;

public plugin_init() {}
Comment 1 jim_yang 2008-12-02 21:15:05 PST
declare it as below
new const Float:

Note You need to log in before you can comment on or make changes to this bug.