Raised This Month: $ Target: $400
 0% 

to much included


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 03-03-2006 , 04:30   to much included
Reply With Quote #1

if i start scripting i include all files that i could possible use,
so i have allwys to much included, not that i get errors but don't think its good for the balast of the server.
anyway, is there a way to see wish #includes i used and wish not?

for example: used this for a script of 156 lines
Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <amxconst> #include <cstrike>
wouter is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-03-2006 , 05:36  
Reply With Quote #2

It all depends if you need the specific module and/or .inc file. Do not include unecessary things. Say you're using the function remove_entity, then you'd need to include engine because that's the module it's in.

http://www.amxmodx.org/funcwiki.php

P.S. amxconst does not need to be included.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
SSJ2GOKU
Senior Member
Join Date: Oct 2005
Location: Belgium
Old 03-03-2006 , 10:05  
Reply With Quote #3

actually

i would always include following modules, just to be sure

Code:
#include <amxmodx> #include <amxmisc> #include <engine>
SSJ2GOKU is offline
Send a message via MSN to SSJ2GOKU
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 03-03-2006 , 10:51  
Reply With Quote #4

so there is no auto-way to check?
then i will need to read all the includes. bommer
to mush reading :p

thx although
wouter is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 03-03-2006 , 11:42  
Reply With Quote #5

if you're using amxx studio
every time you use a func this shows up:
[ --<-@ ] Black Rose is offline
Kraugh
Senior Member
Join Date: Jan 2006
Location: barrington, ri
Old 03-03-2006 , 15:46  
Reply With Quote #6

since version 1.50, modules that are included are automatically required to be running for your plugin to load. this makes it a bad idea to include just whatever you might need. for example, you might include engine because you think you will need it, but do not use any of its functions. a server that does not run engine module will not be able to load your plugin.

you could simply include amxmodx, and write up your script. if you come across a "function not defined" error, look up which include it is from via the funcwiki and include that. eventually you will learn which functions go with which includes.
__________________
"You can not restrain a fool from speaking, but nothing obliges you to listen."
Kraugh is offline
Send a message via AIM to Kraugh
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 03-03-2006 , 16:22  
Reply With Quote #7

ok will remember that
first script then include
wouter 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 20:29.


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