PDA

View Full Version : what the best form of load external functions?


DartakousLien
16/05/2012, 08:45 PM
Well, I've been questioned several times about this and today I decided to ask. What better way for a code to work better or faster? For example, I have a barrier system, missile launchers, and other stripe, but each carries a gamemode and include them all. my doubt is the best way for the code to make it better or faster? As is or place all just a load and include everything?

MP2
16/05/2012, 09:12 PM
As ****** said, (though perhaps not clear enough), includes are 'imported' to your mode at compile time, and are compiled as one .amx file. The .inc files are never used at runtime.

DartakousLien
17/05/2012, 01:56 PM
What? Includes are imported in to your mode so are just as fast as them being there? Are any of these systems slow?
No.
As ****** said, (though perhaps not clear enough), includes are 'imported' to your mode at compile time, and are compiled as one .amx file. The .inc files are never used at runtime.
okk! then why is the file size .amx is different .pwn
now I understand, and understand other things. thank you ******, thank you MP2 :D

TheArcher
17/05/2012, 02:02 PM
As ****** said, (though perhaps not clear enough), includes are 'imported' to your mode at compile time, and are compiled as one .amx file. The .inc files are never used at runtime.

Don't forget about natives. If the .amx file is compiled with any native function, you need the respective plugin until you modify it in .pwn file.