AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic / General Chat (https://forums.alliedmods.net/forumdisplay.php?f=38)
-   -   AMXX 1.70 with SHM compile quick notice. (https://forums.alliedmods.net/showthread.php?t=35926)

Sir-LaggAlot 03-04-2006 22:14

AMXX 1.70 with SHM compile quick notice.
 
If you decide to upgraded to AMXX 1.70 and MetaMod to MetaMod-p 1.19p28, and recompile the heroes using the CVS latest includes, you will get an error saying
Code:

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// sh_agentzero.sma
// C:\HLServer\cstrike\addons\amxmodx\scripting\include\superheromod.inc(492) : er
ror 021: symbol already defined: "replace_all"
//
// 1 Error.
// Could not locate output file compiled\sh_agentzero.amx (compile failed).
//
// Compilation Time: 0.16 sec
// ----------------------------------------

Press enter to exit ...

the only to temporary fix this is go to the superheromod.inc (which is on line 491), just comment out the replace_all function.
Just find this function and comment it out.
Code:

stock replace_all(string[],len,what[],with[])
{
        new withlen,charnum = 0
        withlen = strlen(with)
        while ( replace( string[charnum],len,what,with) != 0) {
                charnum += contain(string[charnum],with) + withlen
        }
}

It should look like this after you comment it out.
Code:

//stock replace_all(string[],len,what[],with[])
//{
        //new withlen,charnum = 0
        //withlen = strlen(with)
        //while ( replace( string[charnum],len,what,with) != 0) {
                //charnum += contain(string[charnum],with) + withlen
        //}
//}

after all that, Save it, then try recompiling your heroes again, that a way to bypass that error for now.

vittu 03-04-2006 23:32

jtp's replace_all function has been added to amxmodx 1.70... It would need a check against which amx/x version is used since amx doesn't have it...

enough 03-05-2006 00:40

so we dont need to recompile and it auto does it?

jtp10181 03-05-2006 09:55

Quote:

Originally Posted by eNougH
so we dont need to recompile and it auto does it?

you have no idea WTF you are talking about.

To compile SH on amxx 1.70 do what Sir-LaggAlot said. That is the best solution. That function is now included in amxx 1.70. Anything else you want to compile on will need that function in tact.

jtp10181 03-05-2006 10:07

I have now updated the CVS with a fix that lets it compile on any AMXX version. Didn't test on AMX (who cares? Not me, thats for sure.)
The new CVS file is the include not the core.


All times are GMT -4. The time now is 14:57.

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