On Thursday, 16 February 2012 at  8:42, Per Inge Mathisen wrote:
> A script should not get a warning for every event it does not
> implement. If you want to warn about misnamed timers, this function
> needs an additional bool parameter that is not set for events. If you
> want to warn about misnamed events, then we could check for functions
> named event*() but not in the set of defined events on load (could be
> a job for lint, but not sure if that is the right tool for the job
> anymore).

It looks to me that change adds a warning if we call any undefined
function. I noticed this behaviour already when I used a wrong function
name, and it took a bit to find the problem, since the game just
silently ignored that line. If the script calls a function that doesn't
exist, why would we ever not want to know about that? So far, the
debuggability of javascript seems not much better than that of wzscript,
maybe integrating a QScriptEngineDebugger would help there.

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to