Skip to content

Commit

Permalink
fixed missing amx param on unload func
Browse files Browse the repository at this point in the history
  • Loading branch information
Southclaws committed Aug 26, 2018
1 parent 840e446 commit 2741dfd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
[submodule "lib/cmake-modules"]
path = lib/cmake-modules
url = https://github.com/Zeex/cmake-modules
[submodule "src/plugin-natives"]
path = src/plugin-natives
url = https://github.com/Y-Less/plugin-natives
2 changes: 1 addition & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@
"cppStandard": "c++17"
}
],
"version": 3
"version": 4
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"filesystem": "cpp",
"xstring": "cpp",
"system_error": "cpp",
"memory": "cpp"
"memory": "cpp",
"thread": "cpp"
},
"C_Cpp.clang_format_style": "WebKit"
}
7 changes: 4 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ PLUGIN_EXPORT bool PLUGIN_CALL Load(void** ppData)
}

extern "C" const AMX_NATIVE_INFO native_list[] = {
{"UUID", Natives::UUID},
{NULL, NULL}};
{ "UUID", Natives::UUID },
{ NULL, NULL }
};

PLUGIN_EXPORT int PLUGIN_CALL AmxLoad(AMX* amx)
{
Expand All @@ -44,7 +45,7 @@ PLUGIN_EXPORT int PLUGIN_CALL Unload()
return 1;
}

PLUGIN_EXPORT int PLUGIN_CALL AmxUnload()
PLUGIN_EXPORT int PLUGIN_CALL AmxUnload(AMX* amx)
{
return 1;
}
12 changes: 6 additions & 6 deletions src/natives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ The code here acts as the translation between AMX data types and native types.
// return 0;
//}

cell Natives::UUID(AMX* amx, cell* params)
{
auto uuid = Impl::UUID();
amx_SetCppString(amx, params[1], uuid, params[2]);
return 0;
}
cell Natives::UUID(AMX* amx, cell* params)
{
auto uuid = Impl::UUID();
amx_SetCppString(amx, params[1], uuid, params[2]);
return 0;
}
5 changes: 2 additions & 3 deletions src/natives.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ Contains all the `PAWN_NATIVE_DECL` for native function declarations.

//PAWN_NATIVE_DECL(uuid, UUID, bool(char*))

namespace Natives
{
cell UUID(AMX *amx, cell *params);
namespace Natives {
cell UUID(AMX* amx, cell* params);
}

#endif

0 comments on commit 2741dfd

Please sign in to comment.