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

fix small code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 01-08-2020 , 12:01   fix small code
Reply With Quote #1

Error
PHP Code:
AMX Mod X Compiler 1.10.0.5388
Copyright 
(c1997-2006 ITB CompuPhase
Copyright 
(c2004-2013 AMX Mod X Team

H
:\AMX\scripting\AmxXDMT.sma(32) : error 017undefined symbol "GetFileTime"
H:\AMX\scripting\AmxXDMT.sma(36) : error 088number of arguments does not match definition
H
:\AMX\scripting\AmxXDMT.sma(56) : error 017undefined symbol "fmt" 
PHP Code:
#include <amxmodx>
#include <cromchat>

new g_szInputFileName[] = "discord_messages_i.txt";

new 
g_iInputTemp;
new 
g_iInputFileModTime;
new 
g_szInputFileLoc[64];
new 
g_szInputMessage[256];

new 
g_szOutputFileName[] = "discord_messages_o.txt";
new 
g_szOutputFileLoc[64];

public 
plugin_init()
{
    
register_plugin("AmxXDMT""1.0b""thEsp");

    
get_datadir(g_szInputFileLoccharsmax(g_szInputFileLoc));
    
format(g_szOutputFileLoccharsmax(g_szOutputFileLoc), "%s\%s"g_szInputFileLocg_szOutputFileName); // Use this first
    
format(g_szInputFileLoccharsmax(g_szInputFileLoc), "%s\%s"g_szInputFileLocg_szInputFileName);

    
register_clcmd("say""cmdMessage");

    
set_task(0.1"tskReadLine", .flags "b");
}

public 
tskReadLine()
{
    if(!
file_exists(g_szInputFileLoc))
        return;

    
g_iInputTemp GetFileTime(g_szInputFileLocFileTime_LastChange);

    if (
g_iInputFileModTime != g_iInputTemp)
    {
        
read_file(g_szInputFileLoc0g_szInputMessagecharsmax(g_szInputMessage));
        
CC_SendMessage(0g_szInputMessage);
        
g_iInputFileModTime g_iInputTemp;
    }
}

public 
cmdMessage(id)
{
    new 
szMessage[128], szTime[16], szTeam[16];
    
read_args(szMessagecharsmax(szMessage));
    
    
remove_quotes(szMessage);
    
trim(szMessage);
    
    if(
equal(szMessage""))
        return;
    
    
get_time("%H:%M:%S"szTimecharsmax(szTime));
    
get_user_team(idszTeamcharsmax(szTeam));

    
write_file(g_szOutputFileLocfmt("[%s] %s %n: %s"szTimeszTeamidszMessage), 0);
}

stock get_datadir(name[], len)
{
    return 
get_localinfo("amxx_datadir"namelen);

__________________

Last edited by Sanjay Singh; 01-08-2020 at 12:26. Reason: re edit
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-08-2020 , 15:34   Re: fix small code
Reply With Quote #2

The plugin requires AMXX 1.9 or above.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 01-09-2020 , 01:10   Re: fix small code
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
The plugin requires AMXX 1.9 or above.
Read error first line amx 1.10
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-09-2020 , 06:52   Re: fix small code
Reply With Quote #4

What error?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 01-09-2020 , 08:16   Re: fix small code
Reply With Quote #5

Quote:
Originally Posted by Sanjay Singh View Post
Read error first line amx 1.10
You have not updated amx correctly.

PHP Code:
AMX Mod X Compiler 1.10.0.5377
Copyright 
(c1997-2006 ITB CompuPhase
Copyright 
(c2004-2013 AMX Mod X Team

Header size
:            732 bytes
Code size
:             4412 bytes
Data size
:             4244 bytes
Stack
/heap size:      16384 bytes
Total requirements
:   25772 bytes
Done
.
[
Finished in 0.2s
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 01-09-2020 , 10:35   Re: fix small code
Reply With Quote #6

Quote:
Originally Posted by iceeedr View Post
You have not updated amx correctly.

PHP Code:
AMX Mod X Compiler 1.10.0.5377
Copyright 
(c1997-2006 ITB CompuPhase
Copyright 
(c2004-2013 AMX Mod X Team

Header size
:            732 bytes
Code size
:             4412 bytes
Data size
:             4244 bytes
Stack
/heap size:      16384 bytes
Total requirements
:   25772 bytes
Done
.
[
Finished in 0.2s
Edit: Plugin Compiled in 1.10 , idk exactly how.

Can you guys convert this plugin to 1.8.2?
__________________

Last edited by Sanjay Singh; 01-09-2020 at 10:43.
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 01-09-2020 , 10:57   Re: fix small code
Reply With Quote #7

Quote:
Originally Posted by Sanjay Singh View Post
Edit: Plugin Compiled in 1.10 , idk exactly how.

Can you guys convert this plugin to 1.8.2?
Wouldn't work. Best to upgrade your amxmodx and compile the plugin.
Why are you even using 1.8.2?
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 01-09-2020 , 11:13   Re: fix small code
Reply With Quote #8

Quote:
Originally Posted by DruGzOG View Post
Wouldn't work. Best to upgrade your amxmodx and compile the plugin.
Why are you even using 1.8.2?
most of my plugins are in 1.8.2 and also some old plugins which I don't have source.
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 01-09-2020 , 11:43   Re: fix small code
Reply With Quote #9

Quote:
Originally Posted by Sanjay Singh View Post
most of my plugins are in 1.8.2 and also some old plugins which I don't have source.
And you're aware that its backwards compatible? Meaning a lot of what was functioning in 1.8.2 should work on the latest stable builds
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-09-2020 , 13:26   Re: fix small code
Reply With Quote #10

You can replace "fmt" with "formatex", but there is no "GetFileTime" alternative in 1.8.2.

There's no reason to still use 1.8.2 - plugins will still work even if not compiled under newer versions.

Quote:
Originally Posted by DruGzOG View Post
Meaning a lot of what was functioning in 1.8.2 should work on the latest stable builds
Not a lot, but all of it. That's the point of backwards-compatibility. If something isn't working, it should reported and it will be fixed ASAP.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 21:33.


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