[Plugin] Long Function Names
#1

Purpose
Normally, Pawn function names cannot exceed 31 characters. This is a limitation of both the compiler and the execution engine, which discards AMX programs with longer function names. This plugin removes this limitation of the AMX engine and allows scripts with longer names (of native functions, public functions, and public variables) to execute normally, without modifications to the names themselves. Other scripts will be unaffected by this plugin.

Other plugins may use this plugin to register natives or call public functions with long names. No special API is required to make this work, since the majority of the AMX API can work with any length. However, you should always use amx_NameLength to retrieve the maximum length used by the script.

You will need a compiler supporting longer function names. Check out my fork which increases the length to 63.

Please note that some Pawn libraries may not work properly with longer identifiers. In this case, you either need to configure them in some way to increase the limit, or contact the author.

Example
pawn Code:
#include <a_samp>

forward VeryLongPublicFunctionNameExceeding31Characters();
public VeryLongPublicFunctionNameExceeding31Characters()
{
    print("hello!");
}

public OnFilterScriptInit()
{
    CallLocalFunction("VeryLongPublicFunctionNameExceeding31Characters", "");
}
Reply


Messages In This Thread
Long Function Names - by IllidanS4 - 16.10.2018, 13:01
Re: Long Function Names - by KinderClans - 16.10.2018, 14:26
Re: Long Function Names - by IllidanS4 - 16.10.2018, 15:13
Re: Long Function Names - by GangstaSunny. - 16.10.2018, 16:13
Re: Long Function Names - by SyS - 16.10.2018, 16:41
Re: Long Function Names - by Peek - 16.10.2018, 21:36
Re: Long Function Names - by Gammix - 16.10.2018, 22:44
Re: Long Function Names - by Whyd - 16.10.2018, 22:50
Re: Long Function Names - by Spoookymon - 27.10.2018, 14:12
Re: Long Function Names - by RogueDrifter - 27.10.2018, 14:43
Re: Long Function Names - by IllidanS4 - 27.10.2018, 15:33

Forum Jump:


Users browsing this thread: 1 Guest(s)