Reply to Re: DinkC Validator public beta
If you don't have an account, just leave the password field blank.
I ran it on all of Initiation's scripts, which I thought were pretty good. It did find a few valid errors.
Variable names actually include the & in the engine. It also might make it a tad easier to immediately see that the validator is complaining about a variable instead of a function.
Line 43: WARNING: the variable "_temp01" has already been defined earlier in the script
In this script (initiation's common.c), I have a series of functions that I call using external. There's no chance that the prior definition will affect the current one. I'm not sure if it's possible / worth-it to try to detect legitimate cases for this warning (such as with main procedures).
Line 101: WARNING: Shorthand if construct detected. These may not work as you expect. It is recommended that you enclose if constructs in braces
The shorthand if construct is only a problem with variable assignments, function calls should always work.
Line 246: ERROR: Found the literal "restart_game", expected command, "if", goto, return, or "}"
credits.c (and a few other scripts)... I'm not sure I see what the problem is. My braces are properly nested and everything. It seems to dislike restart_game entirely.
Line 52: ERROR: Found the literal "Dink must face the same direction as the arrow below him.", expected title_end()
dance.c. Doesn't seem to like titles with multiple lines.
goto end
goto end
goto end
goto end
It printed these lines out in dance3a1.c and a few other scripts, not sure why. Maybe because the label appeared after the goto statement?
Line 48: ERROR: Found the literal "loop", expected command, "if", goto, return, or "}"
ending3.c, this was a label "loop01:"
Line 11: ERROR: Found the literal "armmovie", expected command, "if", goto, return, or "}"
Doesn't like calling procedures declared elsewhere in the file.
Line 16: ERROR: The label "add_item" has not been defined
l3pole1.c : in fact, it had.
Line 43: ERROR: Found the integer "2", expected "("
Doesn't seem to like the function sp_brain_parm2
Variable names actually include the & in the engine. It also might make it a tad easier to immediately see that the validator is complaining about a variable instead of a function.
Line 43: WARNING: the variable "_temp01" has already been defined earlier in the script
In this script (initiation's common.c), I have a series of functions that I call using external. There's no chance that the prior definition will affect the current one. I'm not sure if it's possible / worth-it to try to detect legitimate cases for this warning (such as with main procedures).
Line 101: WARNING: Shorthand if construct detected. These may not work as you expect. It is recommended that you enclose if constructs in braces
The shorthand if construct is only a problem with variable assignments, function calls should always work.
Line 246: ERROR: Found the literal "restart_game", expected command, "if", goto, return, or "}"
credits.c (and a few other scripts)... I'm not sure I see what the problem is. My braces are properly nested and everything. It seems to dislike restart_game entirely.
Line 52: ERROR: Found the literal "Dink must face the same direction as the arrow below him.", expected title_end()
dance.c. Doesn't seem to like titles with multiple lines.
goto end
goto end
goto end
goto end
It printed these lines out in dance3a1.c and a few other scripts, not sure why. Maybe because the label appeared after the goto statement?
Line 48: ERROR: Found the literal "loop", expected command, "if", goto, return, or "}"
ending3.c, this was a label "loop01:"
Line 11: ERROR: Found the literal "armmovie", expected command, "if", goto, return, or "}"
Doesn't like calling procedures declared elsewhere in the file.
Line 16: ERROR: The label "add_item" has not been defined
l3pole1.c : in fact, it had.
Line 43: ERROR: Found the integer "2", expected "("
Doesn't seem to like the function sp_brain_parm2