I can't seem to get this script to compile. I wanted to use it with the PRCSCR to add a quest giver to the single player game with my quest. I used the template on the PRCSCR page to add a NPC to an existing area. I keep getting this error message "No semicolon after expression" so when I remove the semicolon it still won't compile and I get the same message. It's the semicolon at the end of this line (17). WR_SetPlotFlag("ancient_elven_ruins", ADD_QUEST_GIVER_TO_CAMP,TRUE);
#include "plt_ancient_elven_ruins"
#include "wrappers_h"
void main()
{
if(WR_GetPlotFlag(PLT_ANCIENT_ELVEN_RUINS, ADD_QUEST_GIVER_TO_CAMP)==FALSE)
{
object oTown=GetObjectByTag("ntb100ar_dalish_camp");//need area tag, not list tag
vector vJobloLocation = Vector(258.816,233.474,6.57928);// May need to drop "f"
CreateObject(
OBJECT_TYPE_CREATURE,
R"quest_giver_in_camp.utc",
Location(oTown, vjobloLocation, 161.5)
)
WR_SetPlotFlag("ancient_elven_ruins",ADD_QUEST_GIVER_TO_CAMP,TRUE);
}
}
Need help with NPC in existing area script not compiling
Débuté par
Sonmeister
, mai 07 2010 11:17
#1
Posté 07 mai 2010 - 11:17
#2
Posté 08 mai 2010 - 12:32
You do need a semicolon after your CreateObject statement. Also you need to use the same capitalisation everywhere for variable names (eg vJobloLocation).
#3
Posté 08 mai 2010 - 01:03
Thanks, I caught the vJobloLocation but not the other. Tried the semi colon after the CreateObject statement, but it doesn't seem to like that now.
#4
Posté 08 mai 2010 - 01:05
Try your CreateObject on a single line?
CreateObject(OBJECT_TYPE_CREATURE, R"quest_giver_in_camp.utc", Location(oTown, vJobloLocation, 161.5));
CreateObject(OBJECT_TYPE_CREATURE, R"quest_giver_in_camp.utc", Location(oTown, vJobloLocation, 161.5));
#5
Posté 08 mai 2010 - 01:13
That did it, thanks!
#6
Posté 08 mai 2010 - 09:30
A statement doesn't have to be on a single line, of course. But it will often help you spot errors like putting the semicolon after the
Location(oTown, vjobloLocation, 161.5)
rather than after the ) on the next line.
Location(oTown, vjobloLocation, 161.5)
rather than after the ) on the next line.





Retour en haut






