a simple debug check to see if my PRCSCR_ file fired off, but i am getting a 'parsing variable list (8)' error :
#include "wrappers_h"
#include "plt_goron_plot_v1"
void main()
{
int plflag = WR_GetPlotFlag("goron_plot_v1", 2, FALSE)
if (WR_GetPlotFlag("goron_plot_v1", 2, FALSE) == 1)
{
oPlayer = GetMainControlled():
DisplayFloatyMessage(oPlayer,"plot flag set", FLOATY_MESSAGE, 16777215,10.0);
}
else {
oPlayer = GetMainControlled():
DisplayFloatyMessage(oPlayer,"plot flag NOT set", FLOATY_MESSAGE, 16777215,10.0);}
}
line 8 is the IF statement
goron_plot_v1 is the name of my plot holding flag 2 which whas supposedly set in the PRCSCR script i made
can anyone help?
debug request
Débuté par
Baracuda6977
, févr. 14 2010 10:14
#1
Posté 14 février 2010 - 10:14
#2
Posté 15 février 2010 - 12:57
If goron_plot_v1 is the name of your plot resource, you may access its plot ID constant with PLT_GORON_PLOT_V1. So your function call should be like WR_GetPlotFlag(PLT_GORON_PLOT_V1, 2, FALSE).
#3
Posté 15 février 2010 - 03:09
JESUS, look at all the SYNTAX ERRORS HOW DID I MISS THAT
edit: its working...
this isn't :
#include "wrappers_h"
#include "var_constants_h"
void main()
{
object oPlayer = GetMainControlled();
object oMerc = UT_GetNearestObjectByTag(oPlayer, "goron_orz_v1");
if (IsObjectValid(oMerc)){
int mrkup = 90;
SetStoreMarkUp(oMerc,mrkup);}
}
this is SUPPOSED to make all of his goods sell at 90% actual price
goron_orz_v1 is the name of my merc object
edit: its working...
this isn't :
#include "wrappers_h"
#include "var_constants_h"
void main()
{
object oPlayer = GetMainControlled();
object oMerc = UT_GetNearestObjectByTag(oPlayer, "goron_orz_v1");
if (IsObjectValid(oMerc)){
int mrkup = 90;
SetStoreMarkUp(oMerc,mrkup);}
}
this is SUPPOSED to make all of his goods sell at 90% actual price
goron_orz_v1 is the name of my merc object
Modifié par Baracuda6977, 15 février 2010 - 03:18 .
#4
Posté 15 février 2010 - 06:53
Does the script actually execute? My first typical "sanity check" for new scripts is
AddCreatureMoney(1,GetHero());
You could use the logging function instead, of course. ^^ Please also add a check into the if-block.
AddCreatureMoney(1,GetHero());
You could use the logging function instead, of course. ^^ Please also add a check into the if-block.
#5
Posté 17 février 2010 - 12:41
wouldnt that effectually be the same as DisplayFloatyMessage()?
also, i have no clue how to use the logging crap
also, i have no clue how to use the logging crap
#6
Posté 17 février 2010 - 05:44
Yes, it's only a debug help to see if code at that point is executed at all. It's not a "proper" method I guess. ^^ As someone pointed out nicely though (and I wasn't aware of it at that time) spamming DisplayFloatyMessage() will result in not all messages shown. So the message display is good for retrieving current values but not reliable for checking script execution if you need to use the display often.





Retour en haut






