Hi, I recently began using the toolset. I know nothing of C++ language or so. I'm barely making anything by looking at the tutorials but even tutorials sometimes are not noob friendly. Anyway here's problem...
void main()
{
if(WR_GetPlotFlag("grey_warden_officer_q", GREY_WARDEN_SOLDIERS)==FALSE)
{
object oTown = GetObjectByTag("lot110ar_chantry");
vector vOfficerLocation = Vector(4.18272f, -8.27397f, 0f);
CreateObject(OBJECT_TYPE_CREATURE,R"grey_warden_officer.utc", Location(oTown, vOfficerLocation, 0f));
WR_SetPlotFlag("grey_warden_officer_q", GREY_WARDEN_SOLDIERS, TRUE);
}
}
Whatever I do, toolset cannot compile because it doesn't have right "bracket" on the expression on "if" statement. I barely followed the official "adding creatures in the existing maps" guide posted by Craig(?) from BIOWARE and Toolset Wiki thing. If anyone has better script or know how to fix it, please help!
What is wrong with this?
Débuté par
AnnoyingDisplayName
, déc. 30 2009 02:43
#1
Posté 30 décembre 2009 - 02:43
#2
Posté 30 décembre 2009 - 02:57
When I compile your script, I encounter other errors. Is it the complete script? 0f needs to be 0.0f, and I think you're missing a custom include file where GREY_WARDEN_SOLDIERS is defined. Maybe a
#include "plt_grey_warden_officer_q"
at the beginning? I'm assuming you created a plot "grey_warden_officer_q" yourself.
#include "plt_grey_warden_officer_q"
at the beginning? I'm assuming you created a plot "grey_warden_officer_q" yourself.
Modifié par Magic, 30 décembre 2009 - 02:57 .
#3
Posté 30 décembre 2009 - 03:01
I thank you for your reply, I will try that to see if that fixes things.
#4
Posté 30 décembre 2009 - 03:04
Damn!
It still says that "if" statement is wrong because it doesn't have "right brackets"
#5
Posté 30 décembre 2009 - 03:08
That's why I'm wondering if you posted the entire script. I copy&paste the lines from your first post, and there's no bracketing mismatch for me!
#6
Posté 30 décembre 2009 - 03:10
Try expressing it as
if (!(WR_GetPlotFlag(PLT_MY_PLOT, MY_PLOT_FLAG))) {
}
It's a lot of brackets, but it should work. BTW, why are you using a string for your plot rather than just passing the constant? It should be available if you're #including the plot.
if (!(WR_GetPlotFlag(PLT_MY_PLOT, MY_PLOT_FLAG))) {
}
It's a lot of brackets, but it should work. BTW, why are you using a string for your plot rather than just passing the constant? It should be available if you're #including the plot.
#7
Posté 30 décembre 2009 - 03:20
Thank You, Mengtzu.
P.S1 Hmm, I don't think it matters but, my toolset version is 1.01008.0. May be this version has bracket issues? 'Cause I did some searching and no one in this forum seems to have same issue, so might be defecting on Vista or just my system.
P.S1 Hmm, I don't think it matters but, my toolset version is 1.01008.0. May be this version has bracket issues? 'Cause I did some searching and no one in this forum seems to have same issue, so might be defecting on Vista or just my system.
#8
Posté 30 décembre 2009 - 03:42
Since you don't seem to have answered, I'll ask too: "Is that the entirety of your script?"
#9
Posté 30 décembre 2009 - 04:00
Yes, in fact it is, at least according to that accursed Toolset Wiki's How-to section says so.
EDIT: I think I found something that is working but it doesn't spawn my guys when I enter the area. I have to spawn it with runscript command.
EDIT: I think I found something that is working but it doesn't spawn my guys when I enter the area. I have to spawn it with runscript command.
Modifié par AnnoyingDisplayName, 30 décembre 2009 - 04:24 .
#10
Posté 30 décembre 2009 - 04:51
Ah now at least I know which script you're referring to. Those lines from the wiki are an excerpt as well. They wouldn't compile either, lacking includes for plot and wrapper functions.
I avoided dabbling with 2DAs so far, but I think this How-To is using them.
I avoided dabbling with 2DAs so far, but I think this How-To is using them.
#11
Posté 30 décembre 2009 - 05:18
That wiki is cursed!
#12
Posté 01 janvier 2010 - 04:40
if(WR_GetPlotFlag("grey_warden_officer_q", GREY_WARDEN_SOLDIERS)==FALSE)
try
if(WR_GetPlotFlag("grey_warden_officer_q", GREY_WARDEN_SOLDIERS)==FALSE);
try
if(WR_GetPlotFlag("grey_warden_officer_q", GREY_WARDEN_SOLDIERS)==FALSE);
#13
Posté 01 janvier 2010 - 05:03
Jopon wrote...
if(WR_GetPlotFlag("grey_warden_officer_q", GREY_WARDEN_SOLDIERS)==FALSE)
try
if(WR_GetPlotFlag("grey_warden_officer_q", GREY_WARDEN_SOLDIERS)==FALSE);
In most c-based languages, this would be the same as removing that line entirely, since you are following a conditional immediately with the blank statement ";" causing the bracketed statements to always execute. In DAscript this just results in the following compiler error:
If condition cannot be followed by a null statement
I've updated the How-Tos page to be slightly more usable.
It sounds like the problem you are having is with the PRCSCR file not being exported properly.
Try social.bioware.com/wiki/datoolset/index.php/2DA for a bit more info.
Modifié par Craig Graff, 01 janvier 2010 - 05:41 .
#14
Posté 01 janvier 2010 - 06:50
Happy New Year! And bless you all. Also Thanks!
#15
Posté 01 janvier 2010 - 06:55
By the way, my question that is still un-answered. Is there any way to use that "AddNonPartyFollower"? I've been try to use "bhn200ar_castle_after_siege" script's part and "bhn200cr_cousland_follower" script. I've been studying it for hours to figure out what makes NPCs follow me around as a "NonPartyFollower". Any tips on that?
Modifié par AnnoyingDisplayName, 01 janvier 2010 - 06:58 .





Retour en haut






