[Request] Label Syntax Improvement
Posted: 22 Apr 2014, 18:23
Hey there,
I would like to see it being possible to write the following syntaxunfortunately this will cause a syntax error (unexpected curly bracket)
why do i want this?
the declared variables in labels stay alive/available
this might cause problems on naming but also unnecessary memory usage (working in an extra block fixes this)
so i like to wrap my own labels which don't need to be able to create permanent variables in curly bracketsbut that's not possible if you use labels of base scripts like the ModeBase
an additional solution would be adding another syntax used instead of "***" which realises such method-like implementation, like using another character -> "°°°"
but i can't imagine a good one right now
(a work-around is to add a trivial command before the opening bracket, for example the following:i think i don't have to mention that this sucks 
an empty statement would be helpful for this, too ^.^)
regards
I would like to see it being possible to write the following syntax
Code: Select all
***LabelName***
***{
declare Player <=> Players[0];
}***
why do i want this?
the declared variables in labels stay alive/available
this might cause problems on naming but also unnecessary memory usage (working in an extra block fixes this)
so i like to wrap my own labels which don't need to be able to create permanent variables in curly brackets
Code: Select all
{+++LabelName+++}
an additional solution would be adding another syntax used instead of "***" which realises such method-like implementation, like using another character -> "°°°"
but i can't imagine a good one right now

(a work-around is to add a trivial command before the opening bracket, for example the following:
Code: Select all
***LabelName***
***while(False)break;{
declare Player <=> Players[0];
}***

an empty statement would be helpful for this, too ^.^)
regards