5,604,859 Members 33,469 Now Online
XDA Developers Android and Mobile Development Forum

[Q] How to use multiple "IF"

Tip us?
 
vitalero
Old
(Last edited by vitalero; 6th December 2013 at 08:12 PM.)
#1  
vitalero's Avatar
Senior Member - OP
Thanks Meter 44
Posts: 336
Join Date: Dec 2011
Default [Q] How to use multiple "IF"

hello i wanted to know how exactly should i write it down so that i can make different situations for example
if its x=1 new address else if x=2 new address else if x=3 new address and etc
i think im having problem with the $ placement, i wrote
$x=0?*b*/sdcard/*/b*:x=2?*b*/sdcard/*/b*:x=30?*b*/sdcard*/b*$

the /sdcard/ was just example i did include the real address on the code

where ever you see * i meant [ or ] it just xda forum changes it to BOLD so i couldnt write [b] and after [/b
█ Galaxy Nexus GSM █ AOKP KitKat Nightly 2014-01-09█ Franco Kernel #392(osm0sis fix) █
█ Transformer Prime █ AndroWook HairyBean 2.3.1 █ Handsbuah Kernel █
Join to Dropbox and win 500mb free from this Link , Enjoy!
 
kwerdenker
Old
#2  
kwerdenker's Avatar
Recognized Themer
Thanks Meter 1567
Posts: 1,238
Join Date: Apr 2010
Location: Probably the Zooper Forums
Quote:
Originally Posted by vitalero View Post
hello i wanted to know how exactly should i write it down so that i can make different situations for example
if its x=1 new address else if x=2 new address else if x=3 new address and etc
i think im having problem with the $ placement, i wrote
$x=0?*b*/sdcard/*/b*:x=2?*b*/sdcard/*/b*:x=30?*b*/sdcard*/b*$

the /sdcard/ was just example i did include the real address on the code

where ever you see * i meant [ or ] it just xda forum changes it to BOLD so i couldnt write [b] and after [/b
Zooper doesn't support nested conditions, so you can't to if-else conditionals. As long as your situations are not overlapping and only one condition is true at the same time, you can just write them as multiple single conditionals to work around this.
Mobile: LG Nexus 4 | ROM: Paranoid Android 4.0 + Xposed | Kernel: faux Kernel
Tablet: Asus Nexus 7 (2013) | ROM: Paranoid Android 3+ | Kernel: faux Kernel


The Following User Says Thank You to kwerdenker For This Useful Post: [ Click to Expand ]
 
vitalero
Old
#3  
vitalero's Avatar
Senior Member - OP
Thanks Meter 44
Posts: 336
Join Date: Dec 2011
could you give me an example? i made 10 different situations and only 1 can be true at each time
and each time that it changes it takes a different file with the [b][/b command
█ Galaxy Nexus GSM █ AOKP KitKat Nightly 2014-01-09█ Franco Kernel #392(osm0sis fix) █
█ Transformer Prime █ AndroWook HairyBean 2.3.1 █ Handsbuah Kernel █
Join to Dropbox and win 500mb free from this Link , Enjoy!
 
kwerdenker
Old
#4  
kwerdenker's Avatar
Recognized Themer
Thanks Meter 1567
Posts: 1,238
Join Date: Apr 2010
Location: Probably the Zooper Forums
Quote:
Originally Posted by vitalero View Post
could you give me an example? i made 10 different situations and only 1 can be true at each time
and each time that it changes it takes a different file with the [b][/b command
Something like this:
Code:
$#situation#=1?<whatever you want for that condition>$
$#situation#=2?<whatever you want for that condition>$
$#situation#=3?<whatever you want for that condition>$
$#situation#=4?<whatever you want for that condition>$
...
This is obviously just an example to give you the general idea. I'm sure you are able to work your conditions and output into it
Mobile: LG Nexus 4 | ROM: Paranoid Android 4.0 + Xposed | Kernel: faux Kernel
Tablet: Asus Nexus 7 (2013) | ROM: Paranoid Android 3+ | Kernel: faux Kernel


The Following User Says Thank You to kwerdenker For This Useful Post: [ Click to Expand ]
 
vitalero
Old
#5  
vitalero's Avatar
Senior Member - OP
Thanks Meter 44
Posts: 336
Join Date: Dec 2011
Thanks mate works just fine
█ Galaxy Nexus GSM █ AOKP KitKat Nightly 2014-01-09█ Franco Kernel #392(osm0sis fix) █
█ Transformer Prime █ AndroWook HairyBean 2.3.1 █ Handsbuah Kernel █
Join to Dropbox and win 500mb free from this Link , Enjoy!
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes