Wire: Global user defined functions file

Created on 6 Apr 2016  路  2Comments  路  Source: wiremod/wire

I like to use functions, but I don't like to copy and paste the functions from file to file if I want to make a change to them. So my idea is to make a file that automatically loads functions across all the e2 files that need them.
For example you write function isInArray(Array:array,E:entity){ect} inside your function file and you call it in another e2 it will work without you having to ever paste it.

E2 Not a bug Suggestion Won't fix

All 2 comments

Use the include directive,

function entity:shit()
{
    print(This:name())
}

^ file's name is "shit.txt"

if(first())
{
    #include "shit"

    owner():shit()
}

^ works

excellent examples once again

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CaptainPRICE picture CaptainPRICE  路  4Comments

ghost picture ghost  路  9Comments

CaptainPRICE picture CaptainPRICE  路  4Comments

CaptainPRICE picture CaptainPRICE  路  7Comments

TAbdiukov picture TAbdiukov  路  5Comments