SA-MP Forums Archive
working with defines - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: working with defines (/showthread.php?tid=73539)



working with defines - StrickenKid - 15.04.2009

will something like this work with a define?

pawn Code:
#define MyDefine 25000 + random(25001)
i didnt add a ";" because i never saw one on the dcmd define.

and of course the output should be 25000 plus a random of 25000


Re: working with defines - Weirdosport - 16.04.2009

Easiest way would be to have tested it before asking...

pawn Code:
#include <a_samp>
#define MyDefine 25000 + random(25001)

public OnFilterScriptInit()
{
    printf("lol %d", MyDefine);
    return 1;
}
The answer: Yes it does work.


Re: working with defines - StrickenKid - 16.04.2009

Quote:
Originally Posted by Weirdosport
Easiest way would be to have tested it before asking...
never thought of doing that

Thanks Though.