Fixed ReadMapList not seeing maps in all valveFS paths (
bug 5715, r=asherkin).
5 name = "FakeNative Testing Lab #1",
6 author = "AlliedModders LLC",
7 description = "Test suite #1 for dynamic natives",
9 url = "http://www.sourcemod.net/"
12 public bool:AskPluginLoad(Handle:myself, bool:late, String:error[], err_max)
14 CreateNative("TestNative1", __TestNative1);
15 CreateNative("TestNative2", __TestNative2);
16 CreateNative("TestNative3", __TestNative3);
17 CreateNative("TestNative4", __TestNative4);
18 CreateNative("TestNative5", __TestNative5);
22 public __TestNative1(Handle:plugin, numParams)
24 PrintToServer("TestNative1: Plugin: %x params: %d", plugin, numParams);
27 ThrowNativeError(SP_ERROR_NATIVE, "Four parameters ARE NOT ALLOWED lol");
32 public __TestNative2(Handle:plugin, numParams)
34 new String:buffer[512];
37 GetNativeString(1, buffer, sizeof(buffer), bytes);
39 for (new i=0; i<bytes; i++)
41 buffer[i] = buffer[i] + 1;
44 SetNativeString(1, buffer, bytes+1);
47 public __TestNative3(Handle:plugin, numParams)
49 new val1 = GetNativeCell(1);
50 new val2 = GetNativeCellRef(2);
52 SetNativeCellRef(2, val1+val2);
55 public __TestNative4(Handle:plugin, numParams)
57 new size = GetNativeCell(3);
60 GetNativeArray(1, local, size);
61 SetNativeArray(2, local, size);
64 public __TestNative5(Handle:plugin, numParams)
66 new local = GetNativeCell(1);
70 FormatNativeString(2, 4, 5, GetNativeCell(3));
72 new len = GetNativeCell(3);
74 new String:buffer[len];
76 GetNativeStringLength(4, fmt_len);
78 new String:format[fmt_len];
80 GetNativeString(2, buffer, len);
81 GetNativeString(4, format, fmt_len);
83 FormatNativeString(0, 0, 5, len, _, buffer, format);