 |
Xiija Beginner
Joined: 24 Apr 2018 Posts: 14
|
Posted: Wed Jan 21, 2026 8:24 pm
syntax help |
my mud sends a blank or a "yes" as a variable in a prompt...
i tried to figure out the logic/syntax to check for this but failed
| Code: |
#var myvariable ""
#echo var is: @myvariable
#echo nullish: %null( @myvariable)
#IF (%null( @myvariable)) {#var myvariable "NO"}{}
#echo after: @myvariable
|
|
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4790 Location: Pensacola, FL, USA
|
Posted: Thu Jan 22, 2026 7:16 pm |
you are missing a space betwween the true and false segments of your if statement, you can also leave the false off if its empty
|
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4790 Location: Pensacola, FL, USA
|
Posted: Fri Jan 23, 2026 3:32 pm |
#IF (%null( @myvariable)) {#var myvariable "NO"}
|
|
|
|
 |
|
|
|