Raised This Month: $404 Target: $400
 101% 

Module bad load


Post New Thread Reply   
 
Thread Tools Display Modes
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, 14 views)
Resyel is offline
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-18-2018 , 04:41   Re: Module bad load
Reply With Quote #2

Watch the console/logs, it says why the module can't be loaded when it fails. Also set 'developer 1'.
__________________
KliPPy is offline
Resyel
Junior Member
Join Date: Jun 2018
Old 06-18-2018 , 09:40   Re: Module bad load
Reply With Quote #3

Hi and thank for your reply.
Without developer 1 i was getting only this:
PHP Code:
L 06/18/2018 15:39:32: -------- Mapchange to de_dust --------
[
AMXXLoaded 1 admin from file
[S_API FAILSteamAPI_Init() failedSteamAPI_IsSteamRunning() failed.
dlopen failed trying to load:
/
home/cffdddd/.steam/sdk32/steamclient.so
with error
:
/
home/cffdddd/.steam/sdk32/steamclient.socannot open shared object fileNo such file or directory
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit

Executing AMX Mod X Configuration File 
Scrolling message displaying frequency
10:00 minutes
couldn
't exec listip.cfg
couldn'
t exec banned.cfg
Menu item 17 added to Menus Front
-End"Plugin Cvars" from plugin "pluginmenu.amxx"
Menu item 18 added to Menus Front-End"Plugin Commands" from plugin "pluginmenu.amxx"
Connection to Steam servers successful.
   
VAC secure mode is activated.
amx_modules
Currently loaded modules
:
name                    version     author               status     
Fun                     1.8.2       AMX Mod X Dev Team   running    
CStrike                 1.8.2       AMX Mod X Dev Team   running    
CSX                     1.8.2       AMX Mod X Dev Team   running    
unknown                 unknown     unknown              bad load   
unknown                 unknown     unknown              bad load   
5 modules 
With developer 1:
PHP Code:
L 06/18/2018 15:39:32: -------- Mapchange to de_dust --------
[
AMXXLoaded 1 admin from file
[S_API FAILSteamAPI_Init() failedSteamAPI_IsSteamRunning() failed.
dlopen failed trying to load:
/
home/cffdddd/.steam/sdk32/steamclient.so
with error
:
/
home/cffdddd/.steam/sdk32/steamclient.socannot open shared object fileNo such file or directory
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit

Executing AMX Mod X Configuration File 
Scrolling message displaying frequency
10:00 minutes
couldn
't exec listip.cfg
couldn'
t exec banned.cfg
Menu item 17 added to Menus Front
-End"Plugin Cvars" from plugin "pluginmenu.amxx"
Menu item 18 added to Menus Front-End"Plugin Commands" from plugin "pluginmenu.amxx"
Connection to Steam servers successful.
   
VAC secure mode is activated.
amx_modules
Currently loaded modules
:
name                    version     author               status     
Fun                     1.8.2       AMX Mod X Dev Team   running    
CStrike                 1.8.2       AMX Mod X Dev Team   running    
CSX                     1.8.2       AMX Mod X Dev Team   running    
unknown                 unknown     unknown              bad load   
unknown                 unknown     unknown              bad load   
5 modules 
Same output.
My startscript is:
PHP Code:
#!/bin/bash
screen ----S csserver ./hlds_run -console -developer 1 -game cstrike -ip 192.1.1.1 -port 27015 +maxplayers 32 +map de_dust 

Last edited by Resyel; 06-18-2018 at 09:44.
Resyel is offline
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-18-2018 , 10:03   Re: Module bad load
Reply With Quote #4

developer 1 is a cvar so you should prepend it with + instead of -. However -dev will work as well. Here's the command I use for starting my dev server:
__________________

Last edited by KliPPy; 06-18-2018 at 10:03.
KliPPy is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-18-2018 , 11:17   Re: Module bad load
Reply With Quote #5

in code where you registered module info? I did not seen any call to do it
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar,get_pcvar_num(pCvar) ? 1); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-18-2018 , 15:38   Re: Module bad load
Reply With Quote #6

Quote:
Originally Posted by ^SmileY View Post
in code where you registered module info? I did not seen any call to do it
It's done by the SDK and configured in moduleconfig.h, you don't have to explicitly register it like in AMXX plugins.
Also @OP, you don't have to include "sdk/moduleconfig.h", it's done by "amxxmodule.h".
__________________
KliPPy is offline
Resyel
Junior Member
Join Date: Jun 2018
Old 06-18-2018 , 17:10   Re: Module bad load
Reply With Quote #7

Nothing new after using developer 1.
PHP Code:
Adding:  cstrike/addons/metamod/dlls/metamod.so

   Metamod version 1.21p37 Copyright 
(c2001-2013 Will Day
     Patch
Metamod-(mm-pv37 Copyright (c2004-2013 Jussi Kivilinna
   Metamod comes with ABSOLUTELY NO WARRANTY
; for details type `meta gpl'.
   This is free software, and you are welcome to redistribute it
   under certain conditions; type 
`meta gpl' for details.


   AMX Mod X version 1.8.2 Copyright (c) 2004-2006 AMX Mod X Development Team 
   AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'
.
   
This is free software and you are welcome to redistribute it under 
   certain conditions
type 'amxx gpl' for details.
  
Dll loaded for mod Counter-Strike
Spawn Server de_dust
Clearing memory
Using WAD File
halflife.wad
Using WAD File
decals.wad
Using WAD File
cs_dust.wad
Texture load
:    7.0ms
Building PAS
...
Average leaves visible audible total139 403 1298
L 06
/18/2018 23:10:09: -------- Mapchange to de_dust --------
"amxmodx_version" changed to "1.8.2"
"sv_maxspeed" 
changed to "900"
Cvar_Setvariable room_type not found

GAME SKILL LEVEL
:1
Cvar_Set
variable cl_himodels not found
"pausable" changed to "0"
Cvar_Setvariable v_dark not found
0 entities inhibited
[AMXXLoaded 1 admin from file
"amx_language" changed to "en"
"amx_client_languages" 
changed to "1"
"amx_nextmap" 
changed to "de_airstrip"
[S_API FAILSteamAPI_Init() failedSteamAPI_IsSteamRunning() failed.
dlopen failed trying to load:
/
home/sxc/.steam/sdk32/steamclient.so
with error
:
/
home/sxc/.steam/sdk32/steamclient.socannot open shared object fileNo such file or directory
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
"sv_accelerate" changed to "5"
"sv_stopspeed" 
changed to "75"
32 player server started

execing addons
/amxmodx/configs/amxx.cfg
Executing AMX Mod X Configuration File 
Scrolling message displaying frequency
10:00 minutes
execing addons
/amxmodx/configs/sql.cfg
execing addons
/amxmodx/configs/custommenuitems.cfg
Sys_InitializeGameDLL called twice
skipping second call
execing server
.cfg
"sv_aim" changed to "0"
"sv_maxspeed" 
changed to "320"
"mp_timelimit" 
changed to "20"
couldn't exec listip.cfg
couldn'
t exec banned.cfg
Menu item 17 added to Menus Front
-End"Plugin Cvars" from plugin "pluginmenu.amxx"
Menu item 18 added to Menus Front-End"Plugin Commands" from plugin "pluginmenu.amxx"
Connection to Steam servers successful.
   
VAC secure mode is activated

Last edited by Resyel; 06-18-2018 at 17:11.
Resyel is offline
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-18-2018 , 20:15   Re: Module bad load
Reply With Quote #8

Try -debug and +log on, look at the pic I posted. Metamod should be printing a lot more info.
__________________
KliPPy is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-19-2018 , 00:09   Re: Module bad load
Reply With Quote #9

Try update metamod-p 1.21p38

Also why Sys_InitializeGameDLL called twice, skipping second call ??
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar,get_pcvar_num(pCvar) ? 1); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Resyel
Junior Member
Join Date: Jun 2018
Old 06-19-2018 , 10:46   Re: Module bad load
Reply With Quote #10

Hi and thank you both, i cant find metamod p38 this is the newest what i found.

After using commands from you Klippy, this is my output:
PHP Code:
Using WAD Filecs_dust.wad
Texture load
:  203.7ms
Building PAS
...
Average leaves visible audible total139 403 1298
L 06
/19/2018 16:42:27: -------- Mapchange to de_dust --------
L 06/19/2018 16:42:27Server cvar "amxmodx_version" "1.8.2"
"amxmodx_version" 
changed to "1.8.2"
L 06/19/2018 16:42:27Server cvar "sv_maxspeed" "900"
"sv_maxspeed" 
changed to "900"
Cvar_Setvariable room_type not found

GAME SKILL LEVEL
:1
Cvar_Set
variable cl_himodels not found
L 06
/19/2018 16:42:27Server cvar "pausable" "0"
"pausable" 
changed to "0"
L 06/19/2018 16:42:27: [META] (debug:3Calling engine:AddServerCommand()
L 06/19/2018 16:42:27: [META] (debug:3Calling engine:AddServerCommand()
Cvar_Setvariable v_dark not found
0 entities inhibited
L 06
/19/2018 16:42:30: [META] (debug:3Calling amxmodx_mm_i386.so:ServerActivate()
L 06/19/2018 16:42:30: [META] (debug:3Calling cs.so:ServerActivate()
L 06/19/2018 16:42:30: [META] (debug:3Calling amxmodx_mm_i386.so:ServerActivate_Post()
[
AMXXLoaded 1 admin from file
L 06
/19/2018 16:42:30Server cvar "amx_language" "en"
"amx_language" 
changed to "en"
L 06/19/2018 16:42:30Server cvar "amx_client_languages" "1"
"amx_client_languages" 
changed to "1"
L 06/19/2018 16:42:30Server cvar "amx_nextmap" "de_airstrip"
"amx_nextmap" 
changed to "de_airstrip"
L 06/19/2018 16:42:30: [META] (debug:3Calling csx_amxx_i386.so:ServerActivate_Post()
[
S_API FAILSteamAPI_Init() failedSteamAPI_IsSteamRunning() failed.
dlopen failed trying to load:
/
home/ddd/.steam/sdk32/steamclient.so
with error
:
/
home/ddd/.steam/sdk32/steamclient.socannot open shared object fileNo such file or directory
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
PF_MessageEnd_I
:  Unknown User Msg 127
L 06
/19/2018 16:42:31Server cvar "sv_accelerate" "5"
"sv_accelerate" 
changed to "5"
L 06/19/2018 16:42:31Server cvar "sv_stopspeed" "75"
"sv_stopspeed" 
changed to "75"
32 player server started
L 06
/19/2018 16:42:32Started map "de_dust" (CRC "-1641307065")

execing addons/amxmodx/configs/amxx.cfg
Executing AMX Mod X Configuration File
Scrolling message displaying frequency
10:00 minutes
execing addons
/amxmodx/configs/sql.cfg
execing addons
/amxmodx/configs/custommenuitems.cfg
Sys_InitializeGameDLL called twice
skipping second call
execing server
.cfg
L 06
/19/2018 16:42:32Server cvar "sv_aim" "0"
"sv_aim" 
changed to "0"
L 06/19/2018 16:42:32Server cvar "sv_maxspeed" "320"
"sv_maxspeed" 
changed to "320"
L 06/19/2018 16:42:32Server cvar "mp_timelimit" "20"
"mp_timelimit" 
changed to "20"
couldn't exec listip.cfg
couldn'
t exec banned.cfg
Menu item 17 added to Menus Front
-End"Plugin Cvars" from plugin "pluginmenu.amxx"
Menu item 18 added to Menus Front-End"Plugin Commands" from plugin "pluginmenu.amxx"
Connection to Steam servers successful.
   
VAC secure mode is activated.
L 06/19/2018 16:42:39World triggered "Round_Start" 
Maybe is name wrong?
My name of module is: libY_test.so

My Modules.ini
PHP Code:
;;;
To enable a moduleremove the semi-colon (;) in front of its name.
; If 
it's not here, simply add it its name, one per line.
; You don'
t need to write the _amxx part or the file extension.
;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
SQL Modules usually need to be enabled manually ;;
;; 
You can have any number on at a time.  Use      ;;
;;  
amx_sql_type in sql.cfg to specify the default ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;
mysql
;sqlite

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
Put third party modules below here.              ;;
;; 
You can just list their nameswithout the _amxx ;;
;;  or 
file extension.                              ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
These modules will be auto-detected and loaded   ;;
;;  as 
needed.  You do not need to enable them here ;;
;;  
unless you have problems.                       ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

fun
;engine
;fakemeta
;geoip
;sockets
;regex
;nvault
cstrike
csx
;hamsandwich
libY_test 

Last edited by Resyel; 06-19-2018 at 10:48.
Resyel is offline
Reply


Thread Tools
Display Modes

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 11:44.


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