when I try to compile my coding it tells me that "if statement has no effect but the coding use to work and I haven't even touched that section of the coding. Could someone tell me whats wrong. Heres my coding:
mob/Login()
Move(locate(13,14,1)) //where the character starts out
..()
usr.name = input("What is your name?","Your name?",usr.name) // ask the player their name
var/r = input("What is your race?","Your race?") in list ("Saiyan","Half Saiyan","Namek","Android","Icer") // ask the player what the variable 'r' is (ask what race they want to be)
switch(r) // r (the variable that contains race information) is put under the switch() proc. the program is now checking to see what 'r' is, then setting the correct information. see below
if("Saiyan") // the program already knows what it's comparing (r). this was established with the line 'switch(r)'. now the program is checking to see what 'r' equals. just use if("example") to do so, because we've already checked to see what we're lookin// set the icon g at
icon = 'Goku.dmi'
if("Half Saiyan") //this is where the error is
icon = 'Trunks.dmi'
if("Namek")
icon = 'Piccolo.dmi'
if("Android")
icon = 'Android17.dmi'
if("Icer")
icon = 'Icer.dmi'
this is the error im getting:
DBZPW.dm:950:if :warning: if statement has no effect
I would appreciate any help i can get
ID:150678
Aug 11 2001, 4:42 pm
|
|
In response to Deadron
|
|
Deadron wrote:
Tatakau wrote: as well as the 2 lines above and under it... |
In response to FIREking
|
|
FIREking wrote:
Deadron wrote: sorry about forgeting to mention where line 950 was. LINE 950 bside where the errors coming from. Look at the if("Half Saiyan") line,thats the error mob/Login() Move(locate(13,14,1)) //where the character starts out ..() usr.name = input("What is your name?","Your name?",usr.name) // ask the player their name var/r = input("What is your race?","Your race?") in list ("Saiyan","Half Saiyan","Namek","Android","Icer") // ask the player what the variable 'r' is (ask what race they want to be) switch(r) // r (the variable that contains race information) is put under the switch() proc. the program is now checking to see what 'r' is, then setting the correct information. see below if("Saiyan") // the program already knows what it's comparing (r). this was established with the line 'switch(r)'. now the program is checking to see what 'r' equals. just use if("example") to do so, because we've already checked to see what we're lookin// set the icon g at icon = 'Goku.dmi' if("Half Saiyan") //LINE 950// icon = 'Trunks.dmi' if("Namek") icon = 'Piccolo.dmi' if("Android") icon = 'Android17.dmi' if("Icer") icon = 'Icer.dmi' |
In response to Tatakau
|
|
Tatakau wrote:
DBZPW.dm:950:if :warning: if statement has no effect Usualy "if statement has no effect" is an indication that you havn't indented properly. Go to that line, remove all the whitspace at the beginning of it, and tab it back where it should be. |
In response to Shadowdarke
|
|
Shadowdarke wrote:
Tatakau wrote: I fixed the problem, I didn't indent properly. Thanks Shadowdarke for the help. |
Which is line 950?