The problem is that my computer doesn't understand what "RepeatMus" is, But I do not know how to define it for the computer w/o haveing at least 5 errors
Here is my code:
var/RepeatMus = loop() //<<THIS IS WHAT I NEED TO BE DEFINED*/
mob/verb
MortalCombat()
set category = "Songs"
usr << sound('Mortal Kombat.mid', usr.RepeatMus)
Stop()
set category = "Songs"
usr << sound(null)
Repeat_Music()
set category = "Songs"
if (usr.RepeatMus)
usr << "Repeat is now off."
usr.RepeatMus = 0
else
usr << "Repeat is now on."
usr.RepeatMus = 1
ID:261877
Nov 27 2003, 2:46 am
|
|
In response to Airjoe
|
|
ok thanks, but one small other problem
i can put this anywhere EXCEPT the one place I want to put it there are 20 indentation errors and one "empty "else" clause" error, Note: it looks messup here but not on my dream maker, Note2:the only errors are in the "Music" part of it. my bit of code is: mob/master_GM_verbs verb GM_add_Admin(mob/M in world) set desc = "() Grant administrative GM powers to someone permanently" set category = "GM" if(!M.key) usr << "You can't make NPCs into GMs! Isn't that obvious?" return if(M.AdminGMCheck() || M.MasterGMCheck()) usr << "[M] is already an administrative GM or above." return else if(M.GMCheck()) world << "[M] is upgraded from GM status to Administrative GM status by [src]." GMs -= M.key else world << "[M] is granted Administrative GM status by [src]." world.log << "GM [src] (Key: \"[src.key]\") granted Admin GM status to [M] \ (Key: \"[M.key]\")." Admins += M.key M.AddGMVerbs() GM_ghostform() set desc = "() Toggle invisibility and lack of density" set category = "GM" usr.icon = 'invisible.dmi' usr.icon_state = "invisible" density = 0 GM_unghostform() set desc = "() Toggle invisibility and lack of density" set category = "GM" usr.icon = 'car.dmi' usr.icon_state = "convertable" density = 1 GM_remove_Admin(mob/M in world) set desc = "() Strip administrative GM powers from someone permanently" set category = "GM" if(!M.AdminGMCheck()) usr << "[M] isn't an admin!" return else world.log << "GM [src] (Key: \"[src.key]\") removed Admin GM status from [M] \ (Key: \"[M.key]\")." Admins -= M.key M.RemoveGMVerbs() M.AddGMVerbs() GM_reboot() set desc = "() Restart the world" set category = "GM" if(alert("Are you sure?","Reboot","Yes","No") == "Yes") var/mob/M = src M:GM_announce("World is rebooting in 10 seconds!") sleep(100) world.Reboot() GM_Nookie() set category = "GM" world << sound('nookie.mid', usr.RepeatMus) GM_Crawling() set category = "GM" world << sound('crawling.mid', usr.RepeatMus) GM_Getaway() set category = "GM" world << sound('getaway.mid', usr.RepeatMus) GM_InTheEnd() set category = "GM" world << sound('intheend.mid', usr.RepeatMus) GM_Prison() set category = "GM" world << sound('mk4prison.mid', usr.RepeatMus) GM_WhatsMyAgeAgain() set category = "GM" world << sound('whatsmyageagain.mid', usr.RepeatMus) GM_Stop() set category = "GM" world << sound(null) GM_Repeat_Music() set category = "GM" if (!usr.RepeatMus) world << "Repeat is now off." usr.RepeatMus = 0 else world << "Repeat is now on." usr.RepeatMus = 1 |
In response to Chibi_Gohan123
|
|
Check your indentation, then. Without knowing how it is in Dream Maker, no way anyone could be more specific then that.
Plus, you need to lose the ! in your Repeat_Music command. What it's saying right now is, "If they don't have Repeat Music, take Repeat Music away. If they do have Repeat Music, give it to them." |
In response to Hedgemistress
|
|
thanx headress
|
In response to Alex 41693
|
|
Alex 41693 wrote:
thanx headress Heh... I'll have to call her that from now on. =) |
In response to Spuzzum
|
|
I do wear an inordinate amount of hats.
Well, mostly just one at a time. Mostly. |
Here's the correction for the code
mob/var/RepeatMus = 0 //Why mob/var? because your var is usr.RepeatMus, which tells DM that your var is a mob/var type... And 0, to make it so it won't repeat, by default, when the var is first initialized |
2. Just make RepeatMus=1
Also, it should be an else if(!usr.RepeatMus)
because you just turned it off, it goes to the else, then turns it back on (I think)