ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 1286

Hepl me IN ¨THIS CODE

by thelasModder - 08-01-2019 - 09:57 AM
#1
PD:¨I have 15 and this is the ´3 ´week in Vs So IF the solution Is Obious Sorry
#pragma endregion
#pragma region
case Opciones_Principales:
addSubtitle("Opciones Principales");
addBoolOption("Inmortal", Inmortal);
addOption("Balas Infinitas");
addBoolOption("No Policias", NoPolicia);
switch (getOption())
case 1: Inmortal = !Inmortal; break;
case 2: 
case 3: NoPolicia = !NoPolicia; break;
case 4:
case 5:
break;
}
The errror is that case 2 is already apears on this Swich
Reply
#2
You forgot a { after switch (getOption())
_asm
Reply
#3
(08-01-2019 - 09:57 AM)thelasModder Wrote: PD:¨I have 15 and this is the ´3 ´week in Vs So IF the solution Is Obious Sorry
#pragma endregion
#pragma region
case Opciones_Principales:
addSubtitle("Opciones Principales");
addBoolOption("Inmortal", Inmortal);
addOption("Balas Infinitas");
addBoolOption("No Policias", NoPolicia);
switch (getOption())
case 1: Inmortal = !Inmortal; break;
case 2: 
case 3: NoPolicia = !NoPolicia; break;
case 4:
case 5:
break;
}
The errror is that case 2 is already apears on this Swich

Code:
case Opciones_Principales:
        addSubtitle("Opciones Principales");
        addBoolOption("Inmortal", Inmortal);
        addOption("Balas Infinitas");
        addBoolOption("No Policias", NoPolicia);
        switch (getOption())
        { < you forgot this
        case 1: Inmortal = !Inmortal; break;
        case 2:
        case 3: NoPolicia = !NoPolicia; break;
        case 4:
        case 5:
                 break; << this one can delete, not in use
        }
        break; < and forgot this
[Image: a8keeuutawx01.gif]
Reply
#4
u didnt added a break; and u forgot a {

correct code
Hidden Content
You must register or login to view this content.

Reply
#5
(08-01-2019 - 05:29 PM)BModzMasterTM Wrote: u didnt added a break; and u forgot a {

correct code
Hidden Content
You must register or login to view this content.


Why did you do „break; break;“? There is absolutely no reason for that. He just forgot the „opening-{„
_asm
Reply
#6
(08-01-2019 - 03:25 PM)iLLuminder Wrote:
(08-01-2019 - 09:57 AM)thelasModder Wrote: PD:¨I have 15 and this is the ´3 ´week in Vs So IF the solution Is Obious Sorry
#pragma endregion
#pragma region
case Opciones_Principales:
addSubtitle("Opciones Principales");
addBoolOption("Inmortal", Inmortal);
addOption("Balas Infinitas");
addBoolOption("No Policias", NoPolicia);
switch (getOption())
case 1: Inmortal = !Inmortal; break;
case 2: 
case 3: NoPolicia = !NoPolicia; break;
case 4:
case 5:
break;
}
The errror is that case 2 is already apears on this Swich

Code:
case Opciones_Principales:
addSubtitle("Opciones Principales");
addBoolOption("Inmortal", Inmortal);
addOption("Balas Infinitas");
addBoolOption("No Policias", NoPolicia);
switch (getOption())
{ < you forgot this
case 1: Inmortal = !Inmortal; break;
case 2:
case 3: NoPolicia = !NoPolicia; break;
case 4:
case 5:
                break; << this one can delete, not in use
}
break; < and forgot this
Thank You Im New In this
Reply
#7
add break in empty case
Reply
#8
In every case you need to add : break;
Reply

Users browsing: 1 Guest(s)