Animations.lua giving me a confusing problem!



gamemode\animations.lua:645: '}' expected (to close '{' at line 639) near '"models/orange1.mdl"'


And now for those lines.

[lua]

NPCAnim.CombineOWModels =
{ – line 639

"models/combine_super_soldier.mdl",
"models/Combine_Soldier.mdl",
"models/Combine_Soldier_PrisonGuard.mdl",
"models/soldier_stripped.mdl",
"models/orange1.mdl",
"models/Normal1.mdl",

}
[/lua]

Whats wrong?!

[lua]NPCAnim.CombineOWModels =
{ – line 639

"models/combine_super_soldier.mdl",
"models/Combine_Soldier.mdl",
"models/Combine_Soldier_PrisonGuard.mdl",
"models/soldier_stripped.mdl",
"models/orange1.mdl",
"models/Normal1.mdl" 

}[/lua]

You had one an extra " , " at the end.

That shouldn’t affect the table. I’ve done that before and nothing happened.

Entoros is actually right. My guess is you have too many or few brackets in your script. Make sure they add up. A good way of telling is to use Notepad++ or other good editors.

Thanks! I’ll take a look at my brackets and post if that helps :v:

edit:

Nope, Checked all { and } they all have a pair, and I still dont know what the issue is! :argh:

That error is definitely related to that comma. I don’t know how you two don’t get it when you accidentally leave one at the end but it has happened to me too many times for me to count.

Oops!, Yea removing the comma and moving the } directly up to the last model and it worked fine.