Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - CneoC

#1
AI Development / Re: Galaxy syntax validator Tool
March 08, 2010, 02:45:00 AM
Quote from: LAPIN on March 07, 2010, 09:43:45 PM

Version 0.5 is out

i added a simple function check with this version. I also provided a list of "built-in" functions.

nice  ;D
#2
AI Development / Re: Galaxy syntax validator Tool
March 07, 2010, 05:01:06 PM
well the most usefull error validation would probably be name typo's... though that would require a bit more work i guess. But even if it just generated a list of function calls it could not find in the specified includes. (as in, put each function definition in a list and each function call in a separate list and check which calls are not in the definition list :))

It could generate a few false positives if not all includes etc are parsed, but those could be put in a separate function dictionary text file (compile once with a working build and copy/paste everything i guess ;))

same with variables per-function but that is probably even more work ;)
#3
AI Development / Re: Galaxy syntax validator Tool
March 07, 2010, 04:32:56 PM
awesome :)
#4
AI Development / Re: Code Snippets & Functions
March 07, 2010, 04:07:34 PM
Just had to write a function to property output a fixed value since i couldn't find one anywhere... ugly as hell but it does the job ;)

string FixedToString(fixed f) {
    int d = FixedToInt(f);
    int r = FixedToInt((f - d) * 100);
    string rs = IntToString(r);
    if (r <= 0) { r = 1; }
    while (r < 10) { rs = "0" + rs; r *= 10; }
    return IntToString(d) + "." + rs;
}
#5
AI Development / Re: Galaxy syntax validator Tool
March 07, 2010, 10:52:01 AM
Nice tool, already saved me a bit of time so far :)

one thing it doesn't seem to be able to validate though: the += -= *= etc operators, which i use regularly (a += 1; beats a = a + 1; in my book :P)