Raised This Month: $51 Target: $400
 12% 

Module bad load


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Resyel
Junior Member
Join Date: Jun 2018
Old 06-17-2018 , 12:55   Module bad load
Reply With Quote #1

Hi guys. I am trying to do simple amxmodx module, but everytime i try to do it it fail.
I install the module, upload it to my server, i say amx_modules and i see "unknown" bad load

I am using CMAKE and cross g++.

PHP Code:
#include "sdk/amxxmodule.h"
#include "sdk/moduleconfig.h"

#include <iostream>


static cell AMX_NATIVE_CALL YtestLoad(AMX *amxcell *params)
{
    
int params_n params[0] / sizeof(cell);

    if(
params_n != 1)
    {
        
MF_LogError(amxAMX_ERR_NATIVE,"Invalid parameter count. Expecting one parameter");

        return 
0;
    }
    return 
0;
}


AMX_NATIVE_INFO nativess[] = {

        {
"Ytest_Load",                                 YtestLoad},

        {
NULL,NULL}
};

void OnAmxxAttach()
{
    
MF_AddNatives(nativess);

This is my code.
And this is my CMAKE:
PHP Code:
cmake_minimum_required(VERSION 3.10)
project(YTest)

set(CMAKE_CXX_STANDARD 11)

add_library(YTest SHARED library.cpp sdk/amxxmodule.cpp sdk/amxxmodule.h)
set_target_properties(YTest PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32"
amxmodx sdk was official from Amxmodx github, but after fail i update it to the from okapi (https://forums.alliedmods.net/showthread.php?t=234986). And i am using Linux Ubuntu 18.04.
Attached Files
File Type: zip source code.zip (28.2 KB, 132 views)
Resyel is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode