-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
Since SM1.11 i can't use this (or similar) anymore return g_bTest[GetNativeCell(1)];
, will result into this compile error error 077: arrays cannot be indexed by non-integral type 'any'
.
Testcase:
#include <sourcemod>
bool g_bTest[MAXPLAYERS + 1] = { false, ... };
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
{
CreateNative("ES_ClientTestError", Native_ClientTestError);
CreateNative("ES_ClientTestOk", Native_ClientTestOk);
return APLRes_Success;
}
public int Native_ClientTestError(Handle plugin, int numParams)
{
return g_bTest[GetNativeCell(1)]; // enumstruct.sp(15) : error 077: arrays cannot be indexed by non-integral type 'any'
}
public int Native_ClientTestOk(Handle plugin, int numParams)
{
return g_bTest[view_as<int>(GetNativeCell(1))]; // That's fine
}
Metadata
Metadata
Assignees
Labels
No labels