ID:146388
 
Code:
mob/proc //Line 740
queue(list/playerlist,mob/A,mob/B,mob/C,mob/D,mob/E,mob/F,mob/G,mob/H,mob/I,mob/J,mob/K,mob/L) // I can't remember if I even use A-F except to loop back to Battlestart so I probably don't need the /mobs
var/mob/fastest = playerlist[1] //1st person in list is fastest because he wants to be
if(playerlist[2] != null) //but if there's two people...
if(fastest.agl < playerlist[2].agl) //and the other guy is faster...
fastest = playerlist[2] //then he goes first =D
else if(fastest.agl == playerlist[2].agl) //if they're equal,
fastest = pick(fastest,playerlist[2]) // They play rock-paper-scissors for the title
if(playerlist[3] != null) //If there's 3 people...
if(fastest.agl < playerlist[3].agl) // if whoever out of the first two is slower than the 3rd guy
fastest = playerlist[3] //he loses the title :(
else if(fastest.agl == playerlist[3].agl) //if they're equal
fastest = pick (fastest,playerlist[3]) // Rock-Paper-Scissors! ^^
if(playerlist[4] != null) // etc
if(fastest.agl < playerlist[4].agl)
fastest = playerlist[4]
else if(fastest.agl == playerlist[4].agl)
fastest = pick(fastest,playerlist[4])
if(playerlist[5] != null)
if(fastest.agl < playerlist[5].agl)
fastest = playerlist[5]
else if(fastest.agl == playerlist[5].agl)
fastest = pick(fastest,playerlist[5])
if(playerlist[6] != null)
if(fastest.agl < playerlist[6].agl)
fastest = playerlist[6]
else if(fastest.agl == playerlist[6].agl)
fastest = pick(fastest,playerlist[6])
if(playerlist[7] != null)
if(fastest.agl < playerlist[7].agl)
fastest = playerlist[7]
else if(fastest.agl == playerlist[7].agl)
fastest = pick(fastest,playerlist[7])
if(playerlist[8] != null)
if(fastest.agl < playerlist[8].agl)
fastest = playerlist[8]
else if(fastest.agl == playerlist[8].agl)
fastest = pick(fastest,playerlist[8])
if(playerlist[9] != null)
if(fastest.agl < playerlist[9].agl)
fastest = playerlist[9]
else if(fastest.agl == playerlist[9].agl)
fastest = pick(fastest,playerlist[9])
if(playerlist[10] != null)
if(fastest.agl < playerlist[10].agl)
fastest = playerlist[10]
else if(fastest.agl == playerlist[10].agl)
fastest = pick(fastest,playerlist[10])
if(playerlist[11] != null)
if(fastest.agl < playerlist[11].agl)
fastest = playerlist[11]
else if(fastest.agl == playerlist[11].agl)
fastest = pick(fastest,playerlist[11])
if(playerlist[12] != null) //if all 12 people possible are there
if(fastest.agl < playerlist[12].agl)
fastest = playerlist[12]
else if(fastest.agl == playerlist[12].agl) //(If they're all equal, this is not only a battle now, but a rock-paper-scissors tourney!)
fastest = pick(fastest,playerlist[12])
if(fastest.key) fastest.battleprompt() //if human, do the people battle prompt
else fastest.monbatprompt //if not human, monster battle prompt
playerlist -= fastest //that guy is no fun we dont' like him; lets kick him out so someone else has a shot at going first
if(playerlist[1] == null) //if there's nobody left in the playerlist...
if(hpcheck(A,B,C,D,E,F,G,H,I,K,J,K,L)) battlestart(A,B,C,D,E,F,G,H,I,J,K,L) //and one comatant on each side is alive... start over! ("battlestart()" precedes queue())
else
if(hpcheck(A,B,C,D,E,F,G,H,I,K,J,K,L)) queue(playerlist,A,B,C,D,E,F,G,H,I,J,K,L) //Check to see if at least one player and one monster is alive; if so, loop!


Problem description:

C:\Program Files\BYOND\bin\Name Pending\Complex Procs.dm:744:error: .: missing comma ',' or right-paren ')'
C:\Program Files\BYOND\bin\Name Pending\Complex Procs.dm:744:error: ): expected }
C:\Program Files\BYOND\bin\Name Pending\Complex Procs.dm:742:error: location of top-most unmatched {

(It starts on 740 if you didn't catch that)

I hate these errors >_> I think the "real" error (because I found that they usually don't ave more than one problem its just one of the lines) is on line 742 because I can delete the first if() proc (lines 743-746) and get the same error)

Obviously, all the proc is doing is sorting my vars now that I finally figured it out; and of course I am once again denied the satisfaction of getting it done right the first time. I'd feel bad, but I can't remember how that satisfaction feels any more, so I've learned to live without it =P

I don't think the proc itself is written wrong (I was obviously about to test it; as I compiled it =P) but if I have to rewrite it, oh well it only took 10 minutes; and this time you will have told me what I did wrong so I won't screw it up twice =D

I spent twice as long on the post than the code >_> those comments aren't in my .dm file I added them while posting =P

Now I need to do something until someone replies to this, because if I look at it any longer I'll find the error myself and I'll have wasted your time and mine XD
Look on the lines above it for an unclosed parantheses thingie, also, you may want to look up arglist(), that's a pretty lot of arguements you have there.
In response to Ol' Yeller
I know what to do (thus the "I hate these errors" [because I've had them before and I can't always find what's wrong =P]) but I can't find anywhere that has an error... I looked specifically around line 740-750, but I don't see anything >_> maybe I should go into less specifics and ask this question:

Can anyone see anything at all wrong with my proc? :(
In response to Cowdude
Yeah, use arglist. >_>
In response to Ol' Yeller
does that order them all by the var like I've asked 72 times before then? >_> because that would have been nice to know before o_O
In response to Cowdude
Er, I mean it's args. And, yeah, it's everything you put down in order. Like:
proc
asdf()
for(var/a in args)world<<a
mob
verb
test()
asdf(1,7,0,1,7)//Outputs: 1, 7, 0, 1, 7 to the world.
In response to Ol' Yeller
well still that wouldn't help my problem any... I'm just doing it this way because I can keep track of it because its how my mind works =P my problem is of course not related to organization I need to find why I get these errors because I have five ( and five ), one in each line on the first seven lines there; so if you isolate the problem and pretend its in the first 7 lines; this isn't the problem at all o_O

So again, I have all my commas right, I have all my parenthesees right, and I have NEVER used a brace in DM in my life, but I still get those errors =P
That is some of the ugliest code I've ever seen. Why don't you just do this?

proc/Thingy(var/list/playerlist)
var/mob/fastest
for(var/mob/m in playerlist) if((!fastest) || m.agl>fastest.agl)) fastest=m
In response to Jp
That's exactly what I've been asking for the last 5 times; yet nobody even replied to me iirc =/
            if(hpcheck(A,B,C,D,E,F,G,H,I,K,J,K,L)) battlestart(A,B,C,D,E,F,G,H,I,J,K,L) //and one comatant on each side is alive... start over! ("battlestart()" precedes queue())
else
if(hpcheck(A,B,C,D,E,F,G,H,I,K,J,K,L)) queue(playerlist,A,B,C,D,E,F,G,H,I,J,K,L) //Check to see if at least one player and one monster is alive; if so, loop!


its these lines....

it seems you closed the parenthesis tooo early... look at it again.
In response to Crzylme
no, that's not it. Its supposed to do this:
            if(hpcheck(A,B,C,D,E,F,G,H,I,K,J,K,L)) 
battlestart(A,B,C,D,E,F,G,H,I,J,K,L)
else
if(hpcheck(A,B,C,D,E,F,G,H,I,K,J,K,L))
queue(playerlist,A,B,C,D,E,F,G,H,I,J,K,L)

The problem was something with my first few lines; I took those out and used the for() proc that Jp postest and it fixed it =)