Raised This Month: $32 Target: $400
 8% 

compile error


Post New Thread Reply   
 
Thread Tools Display Modes
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 03-18-2023 , 18:07   Re: compile error
Reply With Quote #11

..
Attached Files
File Type: sma Get Plugin or Get Source (code.sma - 34 views - 1.4 KB)
__________________
bigdaddy424 is offline
Ace67
Senior Member
Join Date: Sep 2020
Location: France
Old 03-18-2023 , 18:57   Re: compile error
Reply With Quote #12

Quote:
Originally Posted by bigdaddy424 View Post
..
ty
__________________
CS:CZ > CS 1.6
Ace67 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-19-2023 , 18:16   Re: compile error
Reply With Quote #13

Quote:
Originally Posted by Ace67 View Post
Still getting it
Technically, the indentation warning can be ignored and does not affect the execution of the code at all (other warning might affect execution, this one doesn't). Fixing this is something you need to learn for any text-based language to ensure that the code is properly readable. Everything in a the same scope needs to be indented with the same number and type of whitespace characters. If you're using spaces, all lines in the scope must be indented with spaces and if you're using tabs it must be the same number of tabs. You cannot mix the two if you want to avoid the indentation warning.

It is highly recommended that you use a editor that allows you to check for this. Most editors that are designed for editing source code have the option to show the whitespaces which will let you see if you've mixed spaces and tabs. So, I recommend that you get either Notepad++ or Visual Studio Code (I used Notepad++ when I was on Windows and now use Visual Studio Code on Linux) for editing plugins. There even exists a Visual Studio Code extension specifically for AMX Mod X code that can be very helpful when reading or writing AMX Mod X plugin code.
__________________
fysiks is offline
Ace67
Senior Member
Join Date: Sep 2020
Location: France
Old 03-20-2023 , 13:34   Re: compile error
Reply With Quote #14

Quote:
Originally Posted by fysiks View Post
Technically, the indentation warning can be ignored and does not affect the execution of the code at all (other warning might affect execution, this one doesn't). Fixing this is something you need to learn for any text-based language to ensure that the code is properly readable. Everything in a the same scope needs to be indented with the same number and type of whitespace characters. If you're using spaces, all lines in the scope must be indented with spaces and if you're using tabs it must be the same number of tabs. You cannot mix the two if you want to avoid the indentation warning.

It is highly recommended that you use a editor that allows you to check for this. Most editors that are designed for editing source code have the option to show the whitespaces which will let you see if you've mixed spaces and tabs. So, I recommend that you get either Notepad++ or Visual Studio Code (I used Notepad++ when I was on Windows and now use Visual Studio Code on Linux) for editing plugins. There even exists a Visual Studio Code extension specifically for AMX Mod X code that can be very helpful when reading or writing AMX Mod X plugin code.
Thanks man, im trying to learn amxx since 2020
__________________
CS:CZ > CS 1.6
Ace67 is offline
AquiLa69
New Member
Join Date: Nov 2023
Old 11-21-2023 , 11:32   Re: compile error
Reply With Quote #15

Hello i am now trying to compile my code, but the compiler must not have acces or doesn't recognize the <zombieplague> library

============================================= =================
My error: //AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// pluginamxgive.sma
// D:\Counter-Strike WaRzOnE\cstrike\addons\amxmodx\scripting\plug inamxgive.sma(5) : fatal error 100: cannot read from file: "zombieplague"
//
// Compilation aborted.
// 1 Error.
// Could not locate output file D:\Counter-Strike WaRzOnE\cstrike\addons\amxmodx\scripting\comp iled\pluginamxgive.amx (compile failed).
//
// Compilation Time: 0.19 sec
// ----------------------------------------

Press enter to exit ...
============================================= =================

I don't really know much about AMXmodX but i did some research on the internet and everybody did the same as me... not even the items from cs 1.6 extraitems works on compiling

Consider my code, that is also from a post from this forum, made in 2016



#include <amxmodx>

#include <amxmisc>

#include <zombieplague>



public plugin_init ()

{

register_plugin ( "ZP: Give Ammo", "1.0.0", "Arkshine" );

register_clcmd ( "amx_ammopacks", "CmdGiveAP", ADMIN_CVAR, "- amx_ammopacks <name> <amount> : Give Ammo Packs" );

}



public CmdGiveAP ( id, level, cid )

{

if ( !cmd_access ( id, level, cid, 3 ) )

{

return PLUGIN_HANDLED;

}



new s_Name[ 32 ], s_Amount[ 10000 ];



read_argv ( 1, s_Name, charsmax ( s_Name ) );

read_argv ( 2, s_Amount, charsmax ( s_Amount ) );



new i_Target = cmd_target ( id, s_Name, 2 );



if ( !i_Target )

{

client_print ( id, print_console, "(!) Player not found" );

return PLUGIN_HANDLED;

}



zp_set_user_ammo_packs ( i_Target, max ( 1, str_to_num ( s_Amount ) ) );



return PLUGIN_HANDLED;

}
AquiLa69 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-21-2023 , 23:28   Re: compile error
Reply With Quote #16

First off, please don't post a new question in a thread that is completely unrelated to your issue even though there are a couple words that are similar. Also, custom plugins written to run with AMX Mod X may require non-default resources. So, if a plugin required files that are not part of AMX Mod X itself, you need to find and place the files as required by the custom plugin.

In this case, you are missing the custom include file by that name. So, you'll need to find that include file (make sure you get the one that was intended for this plugin or else it might not work as intended) and place it in the "scripting/include" folder. Then, it should be able to compile successfully.
__________________

Last edited by fysiks; 11-21-2023 at 23:28.
fysiks is offline
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 13:02.


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