AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Compile error (https://forums.alliedmods.net/showthread.php?t=342053)

Ace67 03-05-2023 02:34

Compile error
 
PHP Code:

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


//// basebuilder54.sma
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(62) : error 001: expected token: "=", but found "["
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(67) : error 010: invalid function or declaration
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(72) : error 017: undefined symbol "register_command"
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(72) : warning 215: expression has no effect
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(72) : warning 215: expression has no effect
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(72) : error 001: expected token: ";", but found ")"
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(72) : error 029: invalid expression, assumed zero
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(72) : fatal error 107: too many error messages on one line
//
// Compilation aborted.
// 6 Errors.
// Could not locate output file C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\compiled\basebuilder54.amx (compile failed).
//
// Compilation Time: 0,42 sec
// ----------------------------------------

Press enter to exit ... 

PHP Code:

const g_color_codes[][] =
{
    
"red""green""blue""cyan""magenta""yellow""white""black""gray",
    
"olive""purple""teal""navy""silver""maroon""lime""aqua",
    
"fuchsia""orange""brown""pink""indigo""turquoise""gold"
};

public 
plugin_init()
{
    
register_plugin("Color Changer""1.0""Your Name");
    
register_command("colors""change the color of your build""Usage: /colors [color code]"ADMIN_PLAYER"colors"true);



Celena Luna 03-05-2023 10:13

Re: Compile error
 
Quote:

PHP Code:

const g_color_codes[][] 

=>
PHP Code:

new const g_color_codes[][] 


+
Quote:

PHP Code:

register_command("colors""change the color of your build""Usage: /colors [color code]"ADMIN_PLAYER"colors"true); 

=>
PHP Code:

register_clcmd("/colors""colors"ADMIN_USER"change the color of your build^nUsage: /colors [color code]", -1true); 



Ace67 03-05-2023 10:56

Re: Compile error
 
Quote:

Originally Posted by Celena Luna (Post 2800713)
+

PHP Code:

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


//// basebuilder54.sma
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(63) : error 009: invalid array size (negative or zero)
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(67) : error 010: invalid function or declaration
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(72) : error 088: number of arguments does not match definition
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(79) : error 017: undefined symbol "ADMIN_PLAYER"
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(85) : error 017: undefined symbol "get_arg_string"
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(85) : error 088: number of arguments does not match definition
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(91) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(95) : error 017: undefined symbol "find_substring"
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(99) : error 017: undefined symbol "get_user_grenade_ent"
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(111) : error 035: argument type mismatch (argument 1)
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(112) : error 017: undefined symbol "ENTMESS_NUM"
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(112) : error 088: number of arguments does not match definition
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(114) : error 017: undefined symbol "BASEBUILDER_CHANGECOLOR"
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(114) : error 088: number of arguments does not match definition
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuilder54.sma(198) : error 021: symbol already defined: "plugin_init"
//
// 14 Errors.
// Could not locate output file C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\compiled\basebuilder54.amx (compile failed).
//
// Compilation Time: 0,47 sec
// ----------------------------------------

Press enter to exit ... 


Celena Luna 03-05-2023 11:20

Re: Compile error
 
You didn’t copy correctly. Check again

For example, I changed ADMIN_PLAYER to ADMIN_USER but it still ADMIN_PLAYER in the log

There might be other place too but I don’t know what you change so it better for you to check it yourself

Edit: Wait… why you add 2 plugin_init? Do you know what you you doing?

Ace67 03-05-2023 11:38

Re: Compile error
 
1 Attachment(s)
Quote:

Originally Posted by Celena Luna (Post 2800720)
You didn’t copy correctly. Check again

For example, I changed ADMIN_PLAYER to ADMIN_USER but it still ADMIN_PLAYER in the log

There might be other place too but I don’t know what you change so it better for you to check it yourself

Edit: Wait… why you add 2 plugin_init? Do you know what you you doing?

Let me send you my SMA

Celena Luna 03-06-2023 12:39

Re: Compile error
 
Can I ask where did you get the code?
I don't think it work even when create on seprate plugins since it missing a lot of variable and method

Ace67 03-06-2023 15:21

Re: Compile error
 
Quote:

Originally Posted by Celena Luna (Post 2800778)
Can I ask where did you get the code?
I don't think it work even when create on seprate plugins since it missing a lot of variable and method

My friend maded it for me, He used 6.5 lines and edit for 5.4 basebuilder versio,


All times are GMT -4. The time now is 13:51.

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