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

Round start Health by STEAM ID


Post New Thread Reply   
 
Thread Tools Display Modes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-19-2022 , 23:30   Re: Round start Health by STEAM ID
Reply With Quote #21

PHP Code:
ReloadFile( )
{
    new 
g_szFile128 ]
    
    
get_configsdirg_szFilecharsmaxg_szFile ) );
    
addg_szFilecharsmaxg_szFile ), "/SteamHp.ini" )
    
    if ( !
file_existsg_szFile ) )
        
set_fail_state"ini file not found: %s" g_szFile );

    new 
iFile fopeng_szFile"rt" );
    
//... 
__________________
Bugsy is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-20-2022 , 00:24   Re: Round start Health by STEAM ID
Reply With Quote #22

Quote:
Originally Posted by Bugsy View Post
PHP Code:
ReloadFile( )
{
    new 
g_szFile128 ]
    
    
get_configsdirg_szFilecharsmaxg_szFile ) );
    
addg_szFilecharsmaxg_szFile ), "/SteamHp.ini" )
    
    if ( !
file_existsg_szFile ) )
        
set_fail_state"ini file not found: %s" g_szFile );

    new 
iFile fopeng_szFile"rt" );
    
//... 
You are right ! I have to add a log to check if he did something wrong.
Edit: @ kirksite, The Code has been updated Try it and show console logs
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 04-20-2022 at 00:33.
Supremache is offline
kirksite
Member
Join Date: Feb 2021
Old 04-20-2022 , 16:22   Re: Round start Health by STEAM ID
Reply With Quote #23

First of all, thanks for your help and patience in solving this issue.

I ran into errors when compiling the updated code.

//// PlayerHealth.sma
//cstrike\addons\amxmodx\scripting\PlayerHealth .sma(90) : error 017: undefined symbol "TrieGetSize"
// cstrike\addons\amxmodx\scripting\PlayerHealth .sma(92) : error 017: undefined symbol "TrieGetSize"
// cstrike\addons\amxmodx\scripting\PlayerHealth .sma(95) : error 088: number of arguments does not match definition

// 3 Errors.
// Could not locate output file compiled\PlayerHealth.amx (compile failed).
kirksite is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-20-2022 , 16:34   Re: Round start Health by STEAM ID
Reply With Quote #24

Try now!
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
kirksite
Member
Join Date: Feb 2021
Old 04-20-2022 , 20:11   Re: Round start Health by STEAM ID
Reply With Quote #25

Better but still getting one error.

//// PlayerHealth.sma
// cstrike\addons\amxmodx\scripting\PlayerHealth .sma(99) : error 088: number of arguments does not match definition
//
// 1 Error.
// Could not locate output file compiled\PlayerHealth.amx (compile failed).
kirksite is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-21-2022 , 10:07   Re: Round start Health by STEAM ID
Reply With Quote #26

Quote:
Originally Posted by kirksite View Post
No joy.
complied sma file and uploaded to /cstrike/addons/amxmodx/plugins
saved notepad SteamHP.ini file to /cstrike/addons/amxmodx/configs ("STEAM_0:1:269172" "80")

Hp by steamid 1.0 Supremache PlayerHealth.am running

Currently loaded modules:
name version author status
Fun 1.9.0.5294 AMX Mod X Dev Team running
Engine 1.9.0.5294 AMX Mod X Dev Team running
FakeMeta 1.9.0.5294 AMX Mod X Dev Team running
CStrike 1.9.0.5294 AMX Mod X Dev Team running
CSX 1.9.0.5294 AMX Mod X Dev Team running
Ham Sandwich 1.9.0.5294 AMX Mod X Dev Team running
MySQL 1.9.0.5294 AMX Mod X Dev Team running
I thought you are using amxmodx v 1.9 but you are only using it on the server and not while compiling the plugin anyway, Try it now
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
kirksite
Member
Join Date: Feb 2021
Old 04-21-2022 , 11:24   Re: Round start Health by STEAM ID
Reply With Quote #27

compiled edited code, no issues
uploaded newly compiled PlayereHealth.amxx
confirmed plugin.amxx has PlayerHealth enabled
confirmed SteamHP.ini is in config directory
restarted server
execute command amx_plugins ;
Hp by steamid 1.0 Supremache PlayerHealth.am error

Error Log shows;
PlayerHealth.amxxL 04/21/2022 - 11:12:45: Start of error session.
L 04/21/2022 - 11:12:45: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20220421.log")
L 04/21/2022 - 11:12:45: [AMXX] Plugin ("PlayerHealth.amxx") is setting itself as failed.
L 04/21/2022 - 11:12:45: [AMXX] Plugin says: The file addons/amxmodx/configs/SteamHp.ini doesn't exists
L 04/21/2022 - 11:12:45: [AMXX] Run time error 1 (plugin "PlayerHealth.amxx") - forced exit
L 04/21/2022 - 11:14:52: Start of error session.
L 04/21/2022 - 11:14:52: Info (map "de_dust") (file "addons/amxmodx/logs/error_20220421.log")
L 04/21/2022 - 11:14:52: [AMXX] Plugin ("PlayerHealth.amxx") is setting itself as failed.
L 04/21/2022 - 11:14:52: [AMXX] Plugin says: The file addons/amxmodx/configs/SteamHp.ini doesn't exists
L 04/21/2022 - 11:14:52: [AMXX] Run time error 1 (plugin "PlayerHealth.amxx") - forced exit
L 04/21/2022 - 11:15:56: Start of error session.
L 04/21/2022 - 11:15:56: Info (map "de_contra") (file "addons/amxmodx/logs/error_20220421.log")
L 04/21/2022 - 11:15:56: [AMXX] Plugin ("PlayerHealth.amxx") is setting itself as failed.
L 04/21/2022 - 11:15:56: [AMXX] Plugin says: The file addons/amxmodx/configs/SteamHp.ini doesn't exists
L 04/21/2022 - 11:15:56: [AMXX] Displaying debug trace (plugin "PlayerHealth.amxx", version "1.0")
L 04/21/2022 - 11:15:56: [AMXX] Run time error 1: forced exit
L 04/21/2022 - 11:15:56: [AMXX] [0] PlayerHealth.sma::ReloadFile (line 103)
L 04/21/2022 - 11:15:56: [AMXX] [1] PlayerHealth.sma::plugin_init (line 33)

"SteamHp.ini doesn't exists" in error log yet I have confirmed the file is one the server in the proper directory??
kirksite is offline
kirksite
Member
Join Date: Feb 2021
Old 04-21-2022 , 11:32   Re: Round start Health by STEAM ID
Reply With Quote #28

I deleted the SteamID.ini and uploaded the original and now IT WORKS!

No idea what was wrong with the other file but now no errors are being reported and my health has been changed.

Thanks again for your help and patience in creating this plugin.
kirksite is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-21-2022 , 12:17   Re: Round start Health by STEAM ID
Reply With Quote #29

Quote:
Originally Posted by kirksite View Post
I deleted the SteamID.ini and uploaded the original and now IT WORKS!

No idea what was wrong with the other file but now no errors are being reported and my health has been changed.

Thanks again for your help and patience in creating this plugin.
I told you about the wrong before, the file name is not "SteamID.ini" it is "SteamHp.ini"
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
kirksite
Member
Join Date: Feb 2021
Old 04-21-2022 , 13:16   Re: Round start Health by STEAM ID
Reply With Quote #30

it's the simplest of mistakes that take a huge chunk of time to resolve

Thanks so much for your assistance.
kirksite is offline
Reply



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 10:03.


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