x


Identifier on C#

im using the code below and i get the error is first that it needs an identifier on line 1

 datablock TSShapeConstructor(characterDts)
 {
 baseShape = "./usmarine_anim.dts";
 sequence0 = "./usmarine_anim_Idle_1_(no_gun).dsq Idle_1_(no_gun)";
 sequence1 = "./usmarine_anim_Idle_2_(no_gun).dsq Idle_2_(no_gun)";
 sequence2 = "./usmarine_anim_Walk_(no_gun).dsq Walk_(no_gun)";
 sequence3 = "./usmarine_anim_Walk_backwards_(no_gun).dsq Walk_backwards_(no_gun)";
 sequence4 = "./usmarine_anim_Run_(no_gun).dsq Run_(no_gun)";
 sequence5 = "./usmarine_anim_Jump_(no_gun).dsq Jump_(no_gun)";
 sequence6 = "./usmarine_anim_Left_turn_(no_gun).dsq Left_turn_(no_gun)";
 sequence7 = "./usmarine_anim_Right_turn_(no_gun).dsq Right_turn_(no_gun)";
 sequence8 = "./usmarine_anim_Strafe_left_(no_gun).dsq Strafe_left_(no_gun)";
 sequence9 = "./usmarine_anim_Strafe_right_(no_gun).dsq Strafe_right_(no_gun)";
 sequence10 = "./usmarine_anim_Crouch_walk_(no_gun).dsq Crouch_walk_(no_gun)";
 sequence11 = "./usmarine_anim_Crouch_idle_(no_gun,_knee).dsq 
 Crouch_idle_(no_gun,_knee)";
 sequence12 = "./usmarine_anim_Hit_reaction_(no_gun).dsq Hit_reaction_(no_gun)";
 sequence13 = "./usmarine_anim_Scared_(no_gun).dsq Scared_(no_gun)";
 sequence14 = "./usmarine_anim_Scared_walk_(no_gun).dsq Scared_walk_(no_gun)";
 sequence15 = "./usmarine_anim_Scared_run_(no_gun).dsq Scared_run_(no_gun)";
 sequence16 = "./usmarine_anim_Scared_run_(no_gun)2.dsq Scared_run_(no_gun)2";
 sequence17 = "./usmarine_anim_Surrender_(Hands_up,_no_gun).dsq            
 Surrender_(Hands_up,_no_gun)";
 sequence18 = "./usmarine_anim_Idle_1_(gun_down).dsq Idle_1_(gun_down)";
 sequence19 = "./usmarine_anim_Idle_2_(gun_down).dsq Idle_2_(gun_down)";
 sequence20 = "./usmarine_anim_Walk_(gun_down).dsq Walk_(gun_down)";
 sequence21 = "./usmarine_anim_Walk_backwards_(gun_down).dsq    
 Walk_backwards_(gun_down)";
 sequence22 = "./usmarine_anim_Run_(gun_down).dsq Run_(gun_down)";
 sequence23 = "./usmarine_anim_Jump_(gun_down).dsq Jump_(gun_down)";
 sequence24 = "./usmarine_anim_Left_turn_(gun_down).dsq Left_turn_(gun_down)";
 sequence25 = "./usmarine_anim_Right_turn_(gun_down).dsq Right_turn_(gun_down)";
 sequence26 = "./usmarine_anim_Strafe_left_(gun_down).dsq Strafe_left_(gun_down)";
 sequence27 = "./usmarine_anim_Strafe_right_(gun_down).dsq Strafe_right_(gun_down)";
 sequence28 = "./usmarine_anim_Crouch_walk_(gun_down).dsq Crouch_walk_(gun_down)";
 sequence29 = "./usmarine_anim_Crouch_idle_(gun_down,_knee).dsq  
 Crouch_idle_(gun_down,_knee)";
 sequence30 = "./usmarine_anim_Hit_reaction_(gun_down).dsq Hit_reaction_(gun_down)";
 sequence31 = "./usmarine_anim_Walk_(gun_up).dsq Walk_(gun_up)";
 sequence32 = "./usmarine_anim_Walk_backwards_(gun_up).dsq Walk_backwards_(gun_up)";
 sequence33 = "./usmarine_anim_Run_(gun_up).dsq Run_(gun_up)";
 sequence34 = "./usmarine_anim_Jump_(gun_up).dsq Jump_(gun_up)";
 sequence35 = "./usmarine_anim_Left_turn_(gun_up).dsq Left_turn_(gun_up)";
 sequence36 = "./usmarine_anim_Right_turn_(gun_up).dsq Right_turn_(gun_up)";
 sequence37 = "./usmarine_anim_Strafe_left_(gun_up).dsq Strafe_left_(gun_up)";
 sequence38 = "./usmarine_anim_Strafe_right_(gun_up).dsq Strafe_right_(gun_up)";
 sequence39 = "./usmarine_anim_Crouch_walk_(gun_up).dsq Crouch_walk_(gun_up)";
 sequence40 = "./usmarine_anim_Crouch_idle_(gun_up,_on_one_knee).dsq 
 Crouch_idle_(gun_up,_on_one_knee)";
 sequence41 = "./usmarine_anim_Hit_reaction_(gun_up).dsq Hit_reaction_(gun_up)";
 sequence42 = "./usmarine_anim_Standing_firing_1.dsq Standing_firing_1";
 sequence43 = "./usmarine_anim_Standing_firing_3.dsq Standing_firing_3";
 sequence44 = "./usmarine_anim_Die_forward.dsq Die_forward";
 sequence45 = "./usmarine_anim_Die_backwards.dsq Die_backwards";
 sequence46 = "./usmarine_anim_Ready_with_detonator_.dsq Ready_with_detonator_";
 sequence47 = "./usmarine_anim_Sit_idle_(no_gun).dsq Sit_idle_(no_gun)";
 sequence48 = "./usmarine_anim_Chat_idle_(no_gun_gesturing).dsq 
 Chat_idle_(no_gun_gesturing)";
 sequence49 = "./usmarine_anim_Prone(down).dsq Prone(down)";
 sequence50 = "./usmarine_anim_Prone(gun_down).dsq Prone(gun_down)";
 sequence51 = "./usmarine_anim_Prone(gun_up).dsq Prone(gun_up)";
 sequence52 = "./usmarine_anim_Prone(firing_1).dsq Prone(firing_1)";
 sequence53 = "./usmarine_anim_Prone(firing_2).dsq Prone(firing_2)";
 sequence54 = "./usmarine_anim_Prone(UP).dsq Prone(UP)";
 sequence55 = "./usmarine_anim_Crouch(firing_1).dsq Crouch(firing_1)";
 sequence56 = "./usmarine_anim_Crouch(firing2).dsq Crouch(firing2)";
 sequence57 = "./usmarine_anim_Belly_crawl(no_gun)_.dsq Belly_crawl(no_gun)_";
 sequence58 = "./usmarine_anim_Belly_crawl(gun_down)_.dsq Belly_crawl(gun_down)_";
 sequence59 = "./usmarine_anim_Waving.dsq Waving";
 sequence60 = "./usmarine_anim_Point_forward(no_gun).dsq Point_forward(no_gun)";
 sequence61 = "./usmarine_anim_Point_left(no_gun).dsq Point_left(no_gun)";
 sequence62 = "./usmarine_anim_Point_right(no_gun).dsq Point_right(no_gun)";
 sequence63 = "./usmarine_anim_Point_forward(gun_down).dsq Point_forward(gun_down)";
 sequence64 = "./usmarine_anim_Point_left(gun_down).dsq Point_left(gun_down)";
 sequence65 = "./usmarine_anim_Point_right(gun_down).dsq Point_right(gun_down)";
 sequence66 = "./usmarine_anim_Beckoning_toward(no_gun).dsq Beckoning_toward(no_gun)";
 sequence67 = "./usmarine_anim_Beckoning_away(no_gun).dsq Beckoning_away(no_gun)";
 sequence68 = "./usmarine_anim_Sitting_on_chair(no_gun).dsq Sitting_on_chair(no_gun)";
 sequence69 = "./usmarine_anim_Scratching_head.dsq Scratching_head";
 sequence70 = "./usmarine_anim_Melee_with_rifle.dsq Melee_with_rifle";
 sequence71 = "./usmarine_anim_Throw_grenade.dsq Throw_grenade";
 sequence72 = "./usmarine_anim_Reload_rifle.dsq Reload_rifle";
 sequence73 = "./usmarine_anim_un-jam.dsq un-jam";
 sequence74 = "./usmarine_anim_prisoner.dsq prisoner";
 sequence75 = "./usmarine_anim_Gesturing_yes.dsq Gesturing_yes";
 sequence76 = "./usmarine_anim_Gesturing_no.dsq Gesturing_no";
 sequence77 = "./usmarine_anim_Picking_up_rock.dsq Picking_up_rock";
 sequence78 = "./usmarine_anim_Throwing_rock.dsq Throwing_rock";
 sequence79 = "./usmarine_anim_angrily_part1.dsq angrily_part1";
 sequence80 = "./usmarine_anim_angrily_part2.dsq angrily_part2";
 sequence81 = "./usmarine_anim_angrily_part3.dsq angrily_part3";
 sequence82 = "./usmarine_anim_Chat_idle_2.dsq Chat_idle_2";
 sequence83 = "./usmarine_anim_Chat_idle_3.dsq Chat_idle_3";
 sequence84 = "./usmarine_anim_Sleep_on_ground.dsq Sleep_on_ground";
 };
more ▼

asked Mar 22, 2012 at 11:00 PM

Durante gravatar image

Durante
36 70 49 52

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Is this your entire file? Because if so, it needs a class declaration. C# isn't like JS - you can't just pop a function in a file and expect it to work. Also, are your variables up there defined somewhere?

Perhaps taking a look at this document would help - I'm guessing you're coming from JS.

http://fragileearthstudios.com/2011/10/18/unity-converting-between-c-and-javascript-2/

more ▼

answered Mar 23, 2012 at 12:25 AM

Julien.Lynge gravatar image

Julien.Lynge
10.3k 88 92 137

yes my main language is JS thank you i will take a look at the link provided and yes that is the entire file.

Mar 23, 2012 at 12:28 AM Durante
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x10221
x34

asked: Mar 22, 2012 at 11:00 PM

Seen: 815 times

Last Updated: Mar 23, 2012 at 12:28 AM