In traditional languages, variables must be declared before use.
e.g. in Pascal:
var
year: integer;
(etc)
and yes, this makes more work for the programmer, but far less work than if you dont declare
them & then mis-spell. If, in Pascal you say
yaer:= 2000 ;
the compiler immediately flags the error & tells you the line number. If you do the equivalent
in renpy, the error is invisible. You then have the much harder problem of discovering
1. Program is going wrong
2. because year has a wrong value
3. where is the offending line
and I recently found a game with several bugs of this type. I only stumbled across these,
for all I know there may be others.
In Visual Basic there is an option:
option explicit
that says that variables must be declared. Every advice I have read recommends to use this.
Please is there a similar option in renpy? I have searched both this forum & the manual &
I cannot find this. Thank you
e.g. in Pascal:
var
year: integer;
(etc)
and yes, this makes more work for the programmer, but far less work than if you dont declare
them & then mis-spell. If, in Pascal you say
yaer:= 2000 ;
the compiler immediately flags the error & tells you the line number. If you do the equivalent
in renpy, the error is invisible. You then have the much harder problem of discovering
1. Program is going wrong
2. because year has a wrong value
3. where is the offending line
and I recently found a game with several bugs of this type. I only stumbled across these,
for all I know there may be others.
In Visual Basic there is an option:
option explicit
that says that variables must be declared. Every advice I have read recommends to use this.
Please is there a similar option in renpy? I have searched both this forum & the manual &
I cannot find this. Thank you