This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
jordanlm's profile picture

Getting an "unexpected symbol" error but there does not seem to be anything unusual with my code

Started by jordanlm, 11 June 2013 - 06:52 PM
jordanlm #1
Posted 11 June 2013 - 08:52 PM
I have been making a PvP game in FTB using the 1.5.2(no gregtech) beta pack.

I have been making tables with the classes names, their items, and their abilities.

This is my code:


champs = {"tank","support","stealth","mage","soldier"}
tankStats = {
armor = "diamond",
sword = "iron",
spells = {
shield = {name = "Shield", effect = "resistance", effectPower = 1, durration = 10, cooldown = 30, target = "self"},
regenerate = {name = "Regeneration", effect = "regeneration", effectPower = 2, durration = 15, cooldown = 60, target = "self"},
buff = {name = "Attack Buff", effect = "strength", effectPower = 3, durration = 10, coooldown = 180, target = "self"}
}
}
supportStats = {
armor = "leather",
sword = "stone",
spells = {
groupBuff = {name = "Group Buff", effect = "strength", effectPower = 1, durration = 30, cooldown = 60, target = "group"},
groupShield = {name = "Group Shield", effect = "resistance", effectPower = 1, durration = 15, cooldown = 60, target = "group"},
selfSpeed = {name = "Speed Boost", effect = "speed", effectPower = 3, durration = 10, cooldown = 30, target = "self"},
groupHeal = {name = "Group Heal", effect = "health", effectPower = 3, durration = 1, cooldown = 90, target = "group"}
}
}
stealthStats = {
armor = "leather",
sword = "diamond",
spells = {
stealth = {name = "Invisibility", effect = "invisibility", effectPower = 1, durration = 5, cooldown = 20, target = "self"},
blind = {name = "Blind", effect = "blindness", effectPower = 1, durration = 5, cooldown = 30, target = "enemy"},
--> ninjaJump = {name = "Ninja Jump", effect = "jump boost", = effectPower = 4, durration = 5, cooldown = 60, target = "self"}, <--
nocturnal = {name = "Nocturnal Hunter", effects = {"night vision", "invisibility", "blindness"}, effectPower = 1, durration = 15, cooldown = 120, targets = {"self", "self", "enemy"}}
}
}

The error is on line 27(the line with arrows pointing to it)

I've tried re-writing it over and over again, checking it for any problems, but I am just so confused.
Lyqyd #2
Posted 12 June 2013 - 02:22 AM
Split into new topic.
LBPHacker #3
Posted 12 June 2013 - 02:38 AM
Near the 60th char:
 = effectPower = 4
MCuniverse #4
Posted 12 June 2013 - 05:32 AM
I have been making a PvP game in FTB using the 1.5.2(no gregtech) beta pack.

I have been making tables with the classes names, their items, and their abilities.

This is my code:


champs = {"tank","support","stealth","mage","soldier"}
tankStats = {
armor = "diamond",
sword = "iron",
spells = {
shield = {name = "Shield", effect = "resistance", effectPower = 1, durration = 10, cooldown = 30, target = "self"},
regenerate = {name = "Regeneration", effect = "regeneration", effectPower = 2, durration = 15, cooldown = 60, target = "self"},
buff = {name = "Attack Buff", effect = "strength", effectPower = 3, durration = 10, coooldown = 180, target = "self"}
}
}
supportStats = {
armor = "leather",
sword = "stone",
spells = {
groupBuff = {name = "Group Buff", effect = "strength", effectPower = 1, durration = 30, cooldown = 60, target = "group"},
groupShield = {name = "Group Shield", effect = "resistance", effectPower = 1, durration = 15, cooldown = 60, target = "group"},
selfSpeed = {name = "Speed Boost", effect = "speed", effectPower = 3, durration = 10, cooldown = 30, target = "self"},
groupHeal = {name = "Group Heal", effect = "health", effectPower = 3, durration = 1, cooldown = 90, target = "group"}
}
}
stealthStats = {
armor = "leather",
sword = "diamond",
spells = {
stealth = {name = "Invisibility", effect = "invisibility", effectPower = 1, durration = 5, cooldown = 20, target = "self"},
blind = {name = "Blind", effect = "blindness", effectPower = 1, durration = 5, cooldown = 30, target = "enemy"},
--> ninjaJump = {name = "Ninja Jump", effect = "jump boost", = effectPower = 4, durration = 5, cooldown = 60, target = "self"}, <--
nocturnal = {name = "Nocturnal Hunter", effects = {"night vision", "invisibility", "blindness"}, effectPower = 1, durration = 15, cooldown = 120, targets = {"self", "self", "enemy"}}
}
}

The error is on line 27(the line with arrows pointing to it)

I've tried re-writing it over and over again, checking it for any problems, but I am just so confused.

 = effectPower = 4 
—–^
—–|
—–|
Seriously, LBPHacker is right.
jordanlm #5
Posted 12 June 2013 - 07:58 AM
I'm sorry. I feel really stupid now.

I guess after 5-6 hours of just looking at code you start overlooking obvious mistakes.