This works:
Code:
#include <amxmodx>
#include <engine>
#define DEFINED_CLASSNAME "info_target"
public some_function()
{
create_entity(DEFINED_CLASSNAME)
}
This gives me an error: "Error: Argument type mismatch (argument 1) on line 8"
Code:
#include <amxmodx>
#include <engine>
new const const_classname[] = "info_target"
public some_function()
{
create_entity(const_classname)
}
I want to use a constant instead of a define. According to the
optimization AMWiki, it's a better choice.
This problem doesn't exist in the fakemeta equivalent of this function, however.
Any ideas? (Besides switching to fakemeta.)