Edit Your Comment
why do i get this error when compiling?
तबसे मेंबर है Oct 23, 2012
341 पोस्टों
Sep 14, 2016 at 00:10
तबसे मेंबर है Oct 23, 2012
341 पोस्टों
Im making a closeall button and im stuck on this issue..
void criarlabelControl (string nome,string texto, color cor,int x,int y,int size,int corner=1){
if (nome!="PairLabel")int soma=y+30; else int soma=y; <------ where soma is declared.
ObjectDelete(nome);
ObjectCreate(nome,OBJ_LABEL,0, 0, 0);
ObjectSetText(nome,texto,size, "tahoma", cor);
ObjectSet(nome, OBJPROP_CORNER, corner);
ObjectSet(nome, OBJPROP_XDISTANCE, x);
ObjectSet(nome, OBJPROP_YDISTANCE, soma); <---- its saying its undeclared but it is above
void criarlabelControl (string nome,string texto, color cor,int x,int y,int size,int corner=1){
if (nome!="PairLabel")int soma=y+30; else int soma=y; <------ where soma is declared.
ObjectDelete(nome);
ObjectCreate(nome,OBJ_LABEL,0, 0, 0);
ObjectSetText(nome,texto,size, "tahoma", cor);
ObjectSet(nome, OBJPROP_CORNER, corner);
ObjectSet(nome, OBJPROP_XDISTANCE, x);
ObjectSet(nome, OBJPROP_YDISTANCE, soma); <---- its saying its undeclared but it is above
if you follow the flock like sheep you always end up stepping in shit!
तबसे मेंबर है Aug 20, 2009
256 पोस्टों
Sep 14, 2016 at 02:07
(एडिट हो रहा है Sep 14, 2016 at 02:12)
तबसे मेंबर है Aug 20, 2009
256 पोस्टों
Try this..........
void criarlabelControl (string nome,string texto, color cor,int x,int y,int size,int corner=1){
int soma=0;
if (nome!='PairLabel') soma=y+30; else soma=y;
ObjectDelete(nome);
ObjectCreate(nome,OBJ_LABEL,0, 0, 0);
ObjectSetText(nome,texto,size, 'tahoma', cor);
ObjectSet(nome, OBJPROP_CORNER, corner);
ObjectSet(nome, OBJPROP_XDISTANCE, x);
ObjectSet(nome, OBJPROP_YDISTANCE, soma);
With the new #strict property, variables that are declared within a nest only have scope within that nest. So for example if you use :-
for(int x=10;x>-;x--){do this..............}
You will find you cannot access x later in the function because it loses scope. Presumably same applies to an if nest.
void criarlabelControl (string nome,string texto, color cor,int x,int y,int size,int corner=1){
int soma=0;
if (nome!='PairLabel') soma=y+30; else soma=y;
ObjectDelete(nome);
ObjectCreate(nome,OBJ_LABEL,0, 0, 0);
ObjectSetText(nome,texto,size, 'tahoma', cor);
ObjectSet(nome, OBJPROP_CORNER, corner);
ObjectSet(nome, OBJPROP_XDISTANCE, x);
ObjectSet(nome, OBJPROP_YDISTANCE, soma);
With the new #strict property, variables that are declared within a nest only have scope within that nest. So for example if you use :-
for(int x=10;x>-;x--){do this..............}
You will find you cannot access x later in the function because it loses scope. Presumably same applies to an if nest.
Wealth Creation Through Technology
तबसे मेंबर है Oct 23, 2012
341 पोस्टों
Sep 14, 2016 at 13:34
तबसे मेंबर है Oct 23, 2012
341 पोस्टों
Worked thanks!
if you follow the flock like sheep you always end up stepping in shit!

*व्यवसायिक इस्तेमाल और स्पैम को ब्रदाश नहीं किया जाएगा, और इसका परिणाम खाता को बन्द करना भी हो सकता है.
टिप: किसी चित्र या यूट्यूब या URL को पोस्ट करने से वे अपने आप आपके पोस्ट में आजाएगा!
टिप: @ चिन्ह को टाइप करें उपभोगता के नाम को अपने आप करने के लिए जो इस चर्चा में भाग ले रहा है.