diff -r 000000000000 -r b7aa2b626807 plugins/testsuite/fakenative1.sp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/testsuite/fakenative1.sp Sun Mar 30 07:00:22 2008 +0000 @@ -0,0 +1,85 @@ +#include + +public Plugin:myinfo = +{ + name = "FakeNative Testing Lab #1", + author = "AlliedModders LLC", + description = "Test suite #1 for dynamic natives", + version = "1.0.0.0", + url = "http://www.sourcemod.net/" +}; + +public bool:AskPluginLoad(Handle:myself, bool:late, String:error[], err_max) +{ + CreateNative("TestNative1", __TestNative1); + CreateNative("TestNative2", __TestNative2); + CreateNative("TestNative3", __TestNative3); + CreateNative("TestNative4", __TestNative4); + CreateNative("TestNative5", __TestNative5); + return true; +} + +public __TestNative1(Handle:plugin, numParams) +{ + PrintToServer("TestNative1: Plugin: %x params: %d", plugin, numParams); + if (numParams == 4) + { + ThrowNativeError(SP_ERROR_NATIVE, "Four parameters ARE NOT ALLOWED lol"); + } + return 5; +} + +public __TestNative2(Handle:plugin, numParams) +{ + new String:buffer[512]; + new bytes; + + GetNativeString(1, buffer, sizeof(buffer), bytes); + + for (new i=0; i