lfnetwork.com mark read register faq members calendar

Thread: Syntax error
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 02-23-2009, 07:58 PM   #1
Canderis
@Canderis
Mercenary
 
Canderis's Avatar
 
Status: Super Moderator
Join Date: Jun 2008
Location: Chicago
Posts: 2,609
Current Game: Skyrim
LFN Staff Member  Veteran Modder  Helpful! 
Syntax error

Im trying to make this script and Im getting an error.

Code:
void main ()
object oNPC = GetObjectByTag("Tag"); 
  AssignCommand (oNPC, ChangeObjectAppearance ( object oObjectToChange, int 516 );
Any ideas?


Last edited by Canderis; 02-23-2009 at 08:08 PM.
Canderis is offline   you may: quote & reply,
Old 02-23-2009, 08:23 PM   #2
tk102
@tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,768
Current Game: FTL
10 year veteran!  Forum Veteran  Helpful!  Notable contributor 
A couple things here.

You need opening an opening brace { after the void main() and a closing brace } at the end of the script.

Keep in mind that when using GetObjectByTag you will need to change "Tag" to the actual Tag string specified in the .utc file of the NPC.

You will need a similar line to declare the oObjectToChange object.

You don't need the "int" before 516.

ChangeObjectAppearance doesn't need to be embedded within an AssignCommand function. You can call it directly instead.

example:
Code:
 
void main () {
object oObjectToChange = GetObjectByTag("carth");
ChangeObjectAppearance(oObjectToChange, 516);
}


tk102 is offline   you may: quote & reply,
Old 02-23-2009, 08:52 PM   #3
Canderis
@Canderis
Mercenary
 
Canderis's Avatar
 
Status: Super Moderator
Join Date: Jun 2008
Location: Chicago
Posts: 2,609
Current Game: Skyrim
LFN Staff Member  Veteran Modder  Helpful! 
Thanks Tk, it worked

Canderis is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Star Wars Gamer > Community > The Star Forge > Knights of the Old Republic series > Holowan Laboratories > Syntax error

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:20 AM.

Powered by vBulletin®
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.