Enemy path script issue - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Enemy path script issue (/thread-9612.html) |
Enemy path script issue - Synestral - 08-05-2011 alright, so i have been trying to get an enemy to walk a path, and disapppear. this is the script i have Code: void OnStart() and i get this error FATAL ERROR: could not load script file 'custom_stories/Stalker?maps/Beginning.hps'! main (9,60) : ERR : Expected '(' main (10,60) : ERR : Expected '(' main (11,60) : ERR : Expected '(' main (12,60) : ERR : Expected '(' main (13,60) : ERR : Expected '(' main (14,60) : ERR : Expected '(' main (15,60) : ERR : Expected '(' main (16,60) : ERR : Expected '(' main (17,60) : ERR : Expected '(' main (18,60) : ERR : Expected '(' Does anyone know ehat i am doing wrong? RE: Enemy path script issue - MrCookieh - 08-05-2011 Yours: Code: void Spawn_Monster(string &in entity) Code: void Spawn_Monster(string &in asEntity) you forgot the 'as' in front of the entity, and you put an e instead of an E. ah, and remove those 'string&', same with the 'float' RE: Enemy path script issue - Apjjm - 08-05-2011 Code: void OnStart() Angelscript was interpreting the "float 0" as an attempted cast, which, incidentally, would be written "float(0)". This is not necessary, as the game can implicitly cast from integers to floats correctly. Edit: The "asEntity" correction is unnecessary, you can call your identifiers anything as long as the function signature is correct - you could call it "giantMarshmellow" without a problem, if you really wanted . |