23.01.2012, 04:54
Is it possible to access my other pawn files from one pawn file ?? as in .. the main one can retrieve stuff from another pawn file..
#include "other_file.pwn"
You can include all your other .pwn files into one.
pawn Код:
|
#include "gm_players"
#include "gm_timers"
#include "gm_cmds"
#include "gm_vehicles"
no you can't
there's ways to retrieve variables and ways to retrieve functions from other scripts, which are you interested in? It might be better to convert one to an include or combine them in the one script |
Care to explain? As JamesC's way is correct and can be done like such.
@Original Poster: No, it will only affect the amount of time it takes to compile, which is of no worry. |
well then it'd be an include and should be named with the extension .inc, you could use the extension .pwn
you'd also have to edit the filterscript so it doesn't interfere with the current script, such as hooking duplicate uses of functions/callbacks or renaming them. |
#include "../gamemodes/larp.functions.pwn"
that's fine for other languages that use classes and such, however for consistency and less problems you'd use .inc for includes.
it's fine if you're only going to keep the scripts to yourself, however if you're working in a team or releasing scripts and everyone else has to change their ways to match yours they might get annoyed instead of following what they'd normally do. |