BasicPawn icon indicating copy to clipboard operation
BasicPawn copied to clipboard

enum values in "autocomplete"

Open dragokas opened this issue 4 years ago • 1 comments
trafficstars

Named enums are finally work again in SM v.1.11.

Is it possible to add listing of enum values in "Intellisense & Autocomplete" window whenever we're entering "=" ?

#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>

enum SET_ACTION
{
	SET_ACTION_NONE,
	SET_ACTION_CREATE,
	SET_ACTION_MODIFY
}

public void OnPluginStart()
{
	SET_ACTION act;
	act = 
}

Much thanks.

dragokas avatar Aug 02 '21 18:08 dragokas

You can use SET_ACTION. to show all available enum constants. This was added in BasicPawn since the beginning. When hitting CTRL + ENTER it will be replaced by the constant. Its somewhat C++ like.

Timocop avatar Jan 03 '22 10:01 Timocop