I have a bad variable and i don't know why it is bad. Here is the code for it
if (/obj/music/alternative.alternative == 1)
obj/music/alternative.alternative = 0
src.verbs -= /obj/music/alternative/verb/Blink_182_Adams_song
src.verbs -= /obj/music/alternative/verb/Blink_182_All_The_Small_Things
the variable in the if(/obj) part of the code has no error but the one below it does. help is greatly appreciated
thanx
Little Kid
ID:178294
May 31 2002, 10:58 am
|
|
May 31 2002, 11:02 am
|
|
I would be able to help you but I can't see what you're doing. You need a var/obj/music/alternative though. That's all that i can help you with.
|
In response to Garthor
|
|
I have that, it is defined and everything, which is why one of the /obj/music/alternative vars worked. All I need to know is how to the error I get which is a bad var. I'll just post the code in more detail.
obj music boombox icon = 'music.dmi' icon_state = "BoomBox" name = "Boom Box" var sample verb Switch_CD() set src in usr.contents set category = "Music" src.verbs += /obj/music/boombox/verb/Sample_CD src.verbs += /obj/music/alternative/verb/Alternative_CD if(src.sample == 1) src.sample = 0 src.verbs -= /obj/music/boombox/verb/Linkin_Park_Crawling src.verbs -= /obj/music/boombox/verb/DBZ_Battle_Z src.verbs -= /obj/music/boombox/verb/FF7_Hurry src.verbs -= /obj/music/boombox/verb/Offspring_Pretty_Fly_For_A_White_Guy if (/obj/music/alternative.alternative == 1) this one works obj/music/alternative.alternative = 0 here is where the error is src.verbs -= /obj/music/alternative/verb/Blink_182_Adams_song alternative icon = 'music.dmi' icon_state = "alternative" name = "Alternative CD" var alternative verb Alternative_CD() set category = "Music" src.alternative = 1 src.verbs -= /obj/music/alternative/verb/Alternative_CD src.verbs -= /obj/music/boombox/verb/Sample_CD That is everything that is needed to knw to fix this problem |
In response to LittleKid15
|
|
the problem you're having is obj/music/alternative is referring to just that, a obj/music/alternative. It's not referring to the same thing. The lines of code should be like this...
if (var/obj/music/alternative/A.alternative == 1) |