ID:146091
 
Code:
    verb/Warrior_Levels()
set category = "Levels"
if(src.configs >= (5*(src.warrior_Lev+1)))
if(src.level >= (5*(src.warrior_Lev+1)))
if(src.warrior_Lev < 11)
src.configs-=(5*(src.warrior_Lev+1))
src.warrior_Lev+=1
src << "You have gained one warrior level"
else if(src.warrior_Lev > 10)
if(src.warrior_Lev < 15)
if(client.full_access == 1)
src.configs-=(5*(src.warrior_Lev+1))
src.warrior_Lev+=1
usr << "You have gained one warrior level"
else
usr << "Only Registered players can gain levels 11 and up!"
else
usr << "Maximum level has been obtained. Sorry."
else
src << "You don't have the right level to gain that"
else
src << "You don't have enough configs to gain that"

verb/Archer_Levels()
set category = "Levels"
if(src.configs >= (5*(src.archer_Lev+1)))
if(src.level >= (5*(src.archer_Lev+1)))
if(src.archer_Lev < 11)
src.configs-=(5*(src.archer_Lev+1))
src.archer_Lev+=1
usr << "You have gained one archer level"
else if(src.archer_Lev > 10)
if(src.archer_Lev < 15)
if(client.full_access == 1)
src.configs-=(5*(src.archer_Lev+1))
src.archer_Lev+=1
usr << "You have gained one archer level"
else
usr << "Only Registered players can gain levels 11 and up!"
else
usr << "Maximum level has been obtained. Sorry."
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Thief_Levels()
set category = "Levels"
if(src.configs >= (5*(src.thief_Lev+1)))
if(src.level >= (5*(src.thief_Lev+1)))
if(src.thief_Lev < 11)
src.configs-=(5*(src.thief_Lev+1))
src.thief_Lev+=1
usr << "You have gained one thieving level"
else if(src.thief_Lev > 10)
if(src.thief_Lev < 15)
if(client.full_access == 1)
src.configs-=(5*(src.thief_Lev+1))
src.thief_Lev+=1
usr << "You have gained one thieving level"
else
usr << "Only Registered players can gain levels 11 and up!"
else
usr << "Maximum level has been obtained. Sorry."
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Mage_Levels()
set category = "Levels"
if(src.configs >= (5*(src.mage_Lev+1)))
if(src.level >= (5*(src.mage_Lev+1)))
if(src.mage_Lev < 11)
src.configs-=(5*(src.mage_Lev+1))
src.mage_Lev+=1
usr << "You have gained one mage level"
else if(src.mage_Lev > 10)
if(src.mage_Lev < 15)
if(client.full_access == 1)
src.configs-=(5*(src.mage_Lev+1))
src.mage_Lev+=1
usr << "You have gained one mage level"
else
usr << "Only Registered players can gain levels 11 and up!"
else
usr << "Maximum level has been obtained. Sorry."
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Rider_Levels()
set category = "Levels"
if(src.configs >= (5*(src.rider_Lev+1)))
if(src.level >= (5*(src.rider_Lev+1)))
if(src.rider_Lev < 11)
src.configs-=(5*(src.rider_Lev+1))
src.rider_Lev+=1
usr << "You have gained one rider/breeder level"
else if(src.rider_Lev > 10)
if(src.rider_Lev < 15)
if(client.full_access == 1)
src.configs-=(5*(src.rider_Lev+1))
src.rider_Lev+=1
src << "You have gained one rider/breeder level"
else
src << "Only Registered players can gain levels 11 and up!"
else
src << "Maximum level has been obtained. Sorry."
else
src << "You don't have the right level to gain that"
else
src << "You don't have enough configs to gain that"

verb/Fire_Levels()
set category = "Levels"
if(src.configs >= (5*(src.fire_Lev+1)))
if(src.level >= (5*(src.fire_Lev+1)))
if(src.fire_Lev < 11)
src.configs-=(5*(src.fire_Lev+1))
src.fire_Lev+=1
src.plsdmg +=3
usr << "You have gained one fire level"
else if(src.fire_Lev > 10)
if(src.fire_Lev < 15)
if(client.full_access == 1)
src.configs-=(5*(src.fire_Lev+1))
src.fire_Lev+=1
src << "You have gained one fire level"
else
src << "Only Registered players can gain levels 11 and up!"
else
src << "Maximum level has been obtained. Sorry."
else
src << "You don't have the right level to gain that"
else
src << "You don't have enough configs to gain that"

verb/Lightning_Levels()
set category = "Levels"
if(src.configs >= (5*(src.elec_Lev+1)))
if(src.level >= (5*(src.elec_Lev+1)))
if(src.elec_Lev < 11)
src.configs-=(5*(src.elec_Lev+1))
src.elec_Lev+=1
src.plshit +=3
usr << "You have gained one lightning level"
else if(src.elec_Lev > 10)
if(src.elec_Lev < 15)
if(client.full_access == 1)
src.configs-=(5*(src.elec_Lev+1))
src.elec_Lev+=1
src << "You have gained one lightning level"
else
src << "Only Registered players can gain levels 11 and up!"
else
src << "Maximum level has been obtained. Sorry."
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Ice_Levels()
set category = "Levels"
if(src.configs >= (5*(src.frost_Lev+1)))
if(src.level >= (5*(src.frost_Lev+1)))
if(src.frost_Lev < 11)
src.configs-=(5*(src.frost_Lev+1))
src.frost_Lev+=1
src.hcp +=15
usr << "You have gained one ice level"
else if(src.frost_Lev > 10)
if(src.frost_Lev < 15)
if(client.full_access == 1)
src.configs-=(5*(src.frost_Lev+1))
src.frost_Lev+=1
src << "You have gained one ice level"
else
src << "Only Registered players can gain levels 11 and up!"
else
src << "Maximum level has been obtained. Sorry."
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Wind_Levels()
set category = "Levels"
if(src.configs >= (5*(src.wind_Lev+1)))
if(src.level >= (5*(src.wind_Lev+1)))
if(src.wind_Lev < 11)
src.configs-=(5*(src.wind_Lev+1))
src.wind_Lev+=1
src.plshit+=3
usr << "You have gained one wind level"
else if(src.wind_Lev > 10)
if(src.wind_Lev < 15)
if(client.full_access == 1)
src.configs-=(5*(src.wind_Lev+1))
src.wind_Lev+=1
src << "You have gained one wind level"
else
src << "Only Registered players can gain levels 11 and up!"
else
src << "Maximum level has been obtained. Sorry."
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Water_Levels()
set category = "Levels"
if(src.configs >= (5*(src.watr_Lev+1)))
if(src.level >= (5*(src.watr_Lev+1)))
if(src.watr_Lev < 11)
src.configs-=(5*(src.watr_Lev+1))
src.watr_Lev+=1
src.hcp+=15
usr << "You have gained one water level"
else if(src.watr_Lev > 10)
if(src.watr_Lev < 15)
if(client.full_access == 1)
src.configs-=(5*(src.watr_Lev++1))
src.watr_Lev+=1
src << "You have gained one water level"
else
src << "Only Registered players can gain levels 11 and up!"
else
src << "Maximum level has been obtained. Sorry."
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Earth_Levels()
set category = "Levels"
if(src.configs >= (5*(src.earth_Lev+1)))
if(src.level >= (5*(src.earth_Lev+1)))
if(src.earth_Lev < 11)
src.configs-=(5*(src.earth_Lev+1))
src.earth_Lev+=1
src.plsdef+=3
usr << "You have gained one earth level"
else if(src.earth_Lev > 10)
if(src.earth_Lev < 15)
if(client.full_access == 1)
src.configs-=(5*(src.earth_Lev+1)))
src.earth_Lev+=1
src << "You have gained one earth level"
else
src << "Only Registered players can gain levels 11 and up!"
else
src << "Maximum level has been obtained. Sorry."
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Light_Levels()
set category = "Levels"
if(src.configs >= (5*(src.light_Lev+1)))
if(src.level >= (5*(src.light_Lev+1)))
src.configs-=(5*(src.light_Lev+1))
src.light_Lev+=1
src.see_invisible+=3
usr << "You have gained one light level"
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Dark_Levels()
set category = "Levels"
if(src.configs >= (5*(src.dark_Lev+1)))
if(src.level >= (5*(src.dark_Lev+1)))
src.configs-=(5*(src.dark_Lev+1))
src.dark_Lev+=1
src.invisibility+=6
usr << "You have gained one dark level"
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Battle_Levels()
set category = "Levels"
if(src.configs >= (5*(src.battle_Lev+1)))
if(src.level >= (5*(src.battle_Lev+1)))
src.configs-=(5*(src.battle_Lev+1))
src.battle_Lev+=1
src.plsdef+=2
src.plsdmg+=2
usr << "You have gained one battle level"
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Mystic_Levels()
set category = "Levels"
if(src.configs >= (5*(src.mystic_Lev+1)))
if(src.level >= (5*(src.mystic_Lev+1)))
src.configs-=(5*(src.mystic_Lev+1))
src.battle_Lev+=1
src.magres+=10
usr << "You have gained one mystic level"
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Pisonic_Levels()
set category = "Levels"
if(src.configs >= (5*(src.pison_Lev+1)))
if(src.level >= (5*(src.pison_Lev+1)))
src.configs-=(5*(src.pison_Lev+1))
src.pison_Lev+=1
src.plshit+=1
usr << "You have gained one pison level"
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Mythic_Levels()
set category = "Levels"
if(src.configs >= (5*(src.mythic_Lev+1)))
if(src.level >= (5*(src.mythic_Lev+1)))
src.configs-=(5*(src.mythic_Lev+1))
src.mythic_Lev+=1
src.pwpcp+=1
usr << "You have gained one mythic level"
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"

verb/Leadership_Levels()
set category = "Levels"
if(src.configs >= (5*(src.leadr_Lev+1)))
if(src.level >= (5*(src.leadr_Lev+1)))
src.configs-=(5*(src.leadr_Lev+1))
src.leadr_Lev+=1
src.see_invisible+=3
usr << "You have gained one leadership level"
else
usr << "You don't have the right level to gain that"
else
usr << "You don't have enough configs to gain that"


Problem description:

There is either one to many or one too few brackets in this area. PLEASE HELP!

evolvia.dm:468:error: 1: missing comma ',' or right-paren ')'
evolvia.dm:468:error: 1: missing comma ',' or right-paren ')'
evolvia.dm:468:error: 1: expected end of statement
evolvia.dm:468:error: expected expression
evolvia.dm:468:error: ): expected }
evolvia.dm:467:error: location of top-most unmatched {
evolvia.dm:468:error: ): expected }
evolvia.dm:466:error: location of top-most unmatched {
evolvia.dm:468:error: ): expected }
evolvia.dm:460:error: location of top-most unmatched {
evolvia.dm:468:error: ): expected }
evolvia.dm:459:error: location of top-most unmatched {
evolvia.dm:468:error: ): expected }
evolvia.dm:457:error: location of top-most unmatched {

These errors start the moment I get into the water procedure. And if I delete the prcedure, it only removes two errors.
Um.... Yeah.... PLease point out all the lines where the problem is.

and usually.

missing comma ',' or right-paren ')'

This usually refers to the line BEFORE the stated line.
In response to Crzylme
It BEGINS just as you enter the water levels parameter. First error is right with the command "Set category = 'Levels'" And spans the ENITRE function.

In response to Developous
I meant. Point out the ALL lines using

// [problem stated here]

This will be tremendous help.
In response to Developous
Remedy Discovered. It's all happening only in the water levels procedure, so I will merely alter that.
Actually it appears to be an indentation problem. If it wasn't that it'd be a parentheses problem; brackets don't enter into it. (A bracket is [ ], not ( ) which are parentheses or { } which are braces.)

You'd do very well here to condense all of this code into a single proc, and all those many different vars like warrior_Lev, water_Lev, etc. into a list. The amount of redundant code involved here is ridiculous. A good rule of thumb in design is that if you ever see yourself creating multiple very similar procs or blocks of code like this, or are doing the same with vars, you need to combine them.

Lummox JR
In response to Lummox JR
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
Redundancy forms poor programming habits.
In response to PirateHead
PirateHead wrote:
Redundancy forms poor programming habits.


That's the problem. They are ALL seperate variables, and they NEED to be that way.

But hay, an input box would solve that problem.

Ok, 1 strike for laziness on me.
In response to Developous
Developous wrote:
PirateHead wrote:
Redundancy forms poor programming habits.

That's the problem. They are ALL seperate variables, and they NEED to be that way.

You missed my point. I said they shouldn't be separate variables; they should be a list. You're trying to justify one design flaw with another.

Even if there was a logic in having so many similarly named vars with a similar function, you could use vars[] to access them and still drastically simplify your code.

Lummox JR