Updated for NWNEE 37-13
Updated for NWNEE 37-13. Updated NWNxEE. Full compile. Updated release archive.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
/// @{
|
||||
/// @file nwnx_redis_lib.nss
|
||||
/// @brief Allows connection and interfacing with a redis server.
|
||||
#include "nwnx"
|
||||
|
||||
/// @anchor redis_results
|
||||
/// @name Redis Results
|
||||
@@ -65,44 +64,44 @@ string NWNX_Redis_GetResultAsString(int resultId);
|
||||
|
||||
int NWNX_Redis_GetResultType(int resultId)
|
||||
{
|
||||
NWNX_PushArgumentInt("NWNX_Redis", "GetResultType", resultId);
|
||||
NWNX_CallFunction("NWNX_Redis", "GetResultType");
|
||||
return NWNX_GetReturnValueInt("NWNX_Redis", "GetResultType");
|
||||
NWNXPushInt(resultId);
|
||||
NWNXCall("NWNX_Redis", "GetResultType");
|
||||
return NWNXPopInt();
|
||||
}
|
||||
|
||||
int NWNX_Redis_GetArrayLength(int resultId)
|
||||
{
|
||||
NWNX_PushArgumentInt("NWNX_Redis", "GetResultArrayLength", resultId);
|
||||
NWNX_CallFunction("NWNX_Redis", "GetResultArrayLength");
|
||||
return NWNX_GetReturnValueInt("NWNX_Redis", "GetResultArrayLength");
|
||||
NWNXPushInt(resultId);
|
||||
NWNXCall("NWNX_Redis", "GetResultArrayLength");
|
||||
return NWNXPopInt();
|
||||
}
|
||||
|
||||
// Returns the last
|
||||
int NWNX_Redis_GetArrayElement(int resultId, int idx)
|
||||
{
|
||||
NWNX_PushArgumentInt("NWNX_Redis", "GetResultArrayElement", resultId);
|
||||
NWNX_PushArgumentInt("NWNX_Redis", "GetResultArrayElement", idx);
|
||||
NWNX_CallFunction("NWNX_Redis", "GetResultArrayElement");
|
||||
return NWNX_GetReturnValueInt("NWNX_Redis", "GetResultArrayElement");
|
||||
NWNXPushInt(resultId);
|
||||
NWNXPushInt(idx);
|
||||
NWNXCall("NWNX_Redis", "GetResultArrayElement");
|
||||
return NWNXPopInt();
|
||||
}
|
||||
|
||||
float NWNX_Redis_GetResultAsFloat(int resultId)
|
||||
{
|
||||
NWNX_PushArgumentInt("NWNX_Redis", "GetResultAsString", resultId);
|
||||
NWNX_CallFunction("NWNX_Redis", "GetResultAsString");
|
||||
return StringToFloat(NWNX_GetReturnValueString("NWNX_Redis", "GetResultAsString"));
|
||||
NWNXPushInt(resultId);
|
||||
NWNXCall("NWNX_Redis", "GetResultAsString");
|
||||
return StringToFloat(NWNXPopString());
|
||||
}
|
||||
|
||||
int NWNX_Redis_GetResultAsInt(int resultId)
|
||||
{
|
||||
NWNX_PushArgumentInt("NWNX_Redis", "GetResultAsString", resultId);
|
||||
NWNX_CallFunction("NWNX_Redis", "GetResultAsString");
|
||||
return StringToInt(NWNX_GetReturnValueString("NWNX_Redis", "GetResultAsString"));
|
||||
NWNXPushInt(resultId);
|
||||
NWNXCall("NWNX_Redis", "GetResultAsString");
|
||||
return StringToInt(NWNXPopString());
|
||||
}
|
||||
|
||||
string NWNX_Redis_GetResultAsString(int resultId)
|
||||
{
|
||||
NWNX_PushArgumentInt("NWNX_Redis", "GetResultAsString", resultId);
|
||||
NWNX_CallFunction("NWNX_Redis", "GetResultAsString");
|
||||
return NWNX_GetReturnValueString("NWNX_Redis", "GetResultAsString");
|
||||
NWNXPushInt(resultId);
|
||||
NWNXCall("NWNX_Redis", "GetResultAsString");
|
||||
return NWNXPopString();
|
||||
}
|
||||
|
Reference in New Issue
Block a user