Jump to content

Syntax Error in changed()??


MacMan Gynoid
 Share

You are about to reply to a thread that has been inactive for 4757 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi all,

I'm a little confused and I'm hoping that I can seek help from folks here;

I've got a script that I've been working on and I'm pulling a Syntax Error on the following:

<code snipped off>.....

state_entry()
{
llInstantMessage(OBJ_OWNER,"Don't worry, I'll let you know when another ad is available.");
}
changed (integer CHANGED_INVENTORY)
{  
llInstantMessage(OBJ_OWNER,"There might be some room in "+AD_NUM+" now I'll go check"+llKey2Name(OBJ_OWNER)+" again");

<code snipped off>....

 

The script is giving a syntax error on the line "changed (integer CHANGED_INVENTORY)"

 Insight appriciated.

Thank you for helping! :matte-motes-nerdy:

Link to comment
Share on other sites

CHANGED_INVENTORY is a reserved word - use a different word for the variable

 

ETA:

It's a constant for 1

I guess you wanted to check if the inventory has changed - if the invebtory has changed, the parameter passed by the event is 1 i.e. CHANGED_INVENTORY - it could look like the following

changed (integer change) {   if(change & CHANGED_INVENTORY) {      ...   }}

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4757 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...