Frictional Games Forum (read-only)

Full Version: Error unexpected end of file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Need help, Made a sript but i get the error ""error unexpected end of file""

Can someone help me?
TheScript:

Quote:void OnStart()
{
AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true);
AddEntityCollideCallback("Player", "AreaCollide", "EventCollide", true, 1);
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}
void EventCollide(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Grunt", true);

AddEnemyPatrolNode("Grunt", "Node_1", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Node_2, 0.001f, "");
AddEnemyPatrolNode("Grunt", "Node_3", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Node_4", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Node_5", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Node_6", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Node_7", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Node_8", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Node_9", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Node_10", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Node_11", 0.001f, "");
AddEnemyPatrolNode("Grunt", "Node_12", 0.001f, "");
}
PHP Code:
AddEnemyPatrolNode("Grunt""Node_2, 0.001f, ""); 

This line is missing a quote. I'm assuming you'll know where. Be sure to look over your file properly if you encounter errors like these; they're usually syntax errors, for example a missing symbol or similar.
(08-28-2014, 02:25 PM)Mudbill Wrote: [ -> ]
PHP Code:
AddEnemyPatrolNode("Grunt""Node_2, 0.001f, ""); 

This line is missing a quote. I'm assuming you'll know where. Be sure to look over your file properly if you encounter errors like these; they're usually syntax errors, for example a missing symbol or similar.

And they happen when there was supposed to be 2 of that symbol but was only 1.
What they mean is "Node_2" You are missing the second " Node_2*, you see it?
Probably unecessary to point it out to the highest detail. Gotta let them do some work themselves or they'll never learn, ya know?
(08-28-2014, 07:34 PM)Mudbill Wrote: [ -> ]Probably unecessary to point it out to the highest detail. Gotta let them do some work themselves or they'll never learn, ya know?

Truth!