Thread: [Solved] Dhud compile error
View Single Post
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 08-28-2022 , 13:43   Re: Dhud compile error
Reply With Quote #2

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.
__________________

Last edited by deprale; 08-28-2022 at 13:50.
deprale is offline