Quote:
Originally Posted by Pelipoika
Nice OS
EDIT:
Still works fine on Windows 19.07.2018
|
still can't get it to work
Code:
Found "navarea_count" @ 0x0
L 07/23/2018 - 18:23:44: [SM] Exception reported: Invalid address 0x4 is pointing to reserved memory.
L 07/23/2018 - 18:23:44: [SM] Blaming: test.smx
L 07/23/2018 - 18:23:44: [SM] Call stack trace:
L 07/23/2018 - 18:23:44: [SM] [0] LoadFromAddress
L 07/23/2018 - 18:23:44: [SM] [1] Line 13, C:\Users\test\Dropbox\sm 1.8\test.sp::OnMapStart
[SM] Loaded plugin test.smx successfully.
SourceMod Version Information:
SourceMod Version: 1.9.0.6245
SourcePawn Engine: 1.9.0.6245, jit-x86 (build 1.9.0.6245)
SourcePawn API: v1 = 4, v2 = 12
Compiled on: Jul 13 2018 04:50:03
Built from: https://github.com/alliedmodders/sourcemod/commit/50b5bb19
Build ID: 6245:50b5bb19
http://www.sourcemod.net/
Metamod:Source version 1.10.7-dev
Built from: https://github.com/alliedmodders/metamod-source/commit/20c72b5
Build ID: 963:20c72b5
Loaded As: Valve Server Plugin
Compiled on: Jul 7 2018
Plugin interface version: 15:14
SourceHook version: 5:5
http://www.metamodsource.net/
PHP Code:
Address TheNavAreas;
Address navarea_count;
//You want to do this in OnMapStart or else after a map change you will have a bad address
public void OnMapStart()
{
Handle hConf = LoadGameConfigFile("yourgamedata");
navarea_count = GameConfGetAddress(hConf, "navarea_count");
PrintToServer("Found \"navarea_count\" @ 0x%X", navarea_count);
//TheNavAreas is nicely above navarea_count
TheNavAreas = view_as<Address>(LoadFromAddress(navarea_count + view_as<Address>(0x4), NumberType_Int32));
PrintToServer("Found \"TheNavAreas\" @ 0x%X", TheNavAreas);
delete hConf;
}
__________________