Thread: [Solved] Dhud compile error
View Single Post
luciaus18
Senior Member
Join Date: Dec 2014
Old 08-30-2022 , 06:27   Re: Dhud compile error
Reply With Quote #5

Quote:
Originally Posted by deprale View Post
Update your AMXX version!

Compiles fine on 1.10, if I remember correctly you said you were on 1.8.2, and I checked the includes from both 1.8.2 and 1.10 and they're literally the same with the exception of &txtlen being initialized.

I downloaded 1.8.1 and checked file.inc still no changes, it really won't compile on 1.8.2 I just tested it and it's honestly confusing since on 1.10 it still has 4 arguments but it compiles fine with no issues even though
https://github.com/alliedmodders/amx.../file.cpp#L107 it wants 5 params.

So maybe an oversight from the AMXX devs, or maybe I'm retarded, no idea.

Anyway, try changing it from
PHP Code:
    for(new i=0;i<get_file_lines(ads_path);i++)
    {
        
read_file(ads_path,i,ads[ads_count],charsmax(ads))
        
ads_count++
    } 
TO
PHP Code:
for(new i=0;i<get_file_lines(ads_path);i++)
    {
        new 
temp;
        
read_file(ads_path,i,ads[ads_count],charsmax(ads), temp)
        
ads_count++
    } 
See if it works (didn't test)

EDIT: Visual studio code owned me, the "&" wasn't displayed and I was confused, it just retrieves the length it read.
Ok, this is what I get with this change:
Code:
//// amx_ads.sma
// cstrike\addons\amxmodx\Compiler\scripting\amx_ads.sma(81) : warning 217: loose indentation
// cstrike\addons\amxmodx\Compiler\scripting\amx_ads.sma(81) : error 088: number of arguments does not match definition
// cstrike\addons\amxmodx\Compiler\scripting\amx_ads.sma(83) : warning 203: symbol is never used: "temp"
//
// 1 Error.
// Could not locate output file compiled\amx_ads.amx (compile failed).
I wanted to keep my amxmodx 1.8.2 because of some plugins which doesn't work properly with 1.8.3 or 1.9.0.

I want to ask if someone can help me to make that dhudmessage to hudmessage. I'm not really good at that point..
I don't want to start another thread

Last edited by luciaus18; 08-30-2022 at 06:31.
luciaus18 is offline