| Hartmann   Member
 
 Posts: 52
 Threads: 18
 Joined: Jun 2012
 Reputation: 
0
 | 
			| RE: Error. missing a ";" or "," 
 
				 (06-23-2012, 04:17 PM)FastHunteR Wrote:  wrong function then, you need a callback.use this inside OnStart():
 SetEntityCallbackFunc("key_3", "OnPickup");
 
 Then instead of this:
 void SetEntityCallbackFunc(string& asName, string& asCallback);
 {
 AddPropImpulse("mansion_3", 0, 0, 10, "World");
 AddTimer("StopLook", 3, "LookAtDoor");
 PlaySoundAtEntity("", "unlock_door.snt", "mansion_5", 0.0f, true);
 StartPlayerLookAt("mansion35", 10, 10, "");
 }
 
 use this:
 void OnPickup(string &in asEntity, string &in type)
 {
 AddPropImpulse("mansion_3", 0, 0, 10, "World");
 AddTimer("StopLook", 3, "LookAtDoor");
 PlaySoundAtEntity("", "unlock_door.snt", "mansion_5", 0.0f, true);
 StartPlayerLookAt("mansion35", 10, 10, "");
 }
 by the way, you really want the player to look at "mansion35" or do you mean mansion_5 and you got a typo? Anyway, fix it if you got one.
 
 Also, at every PlaySoundAtEntity function, use the extension .snt at the sound name. Example:
 PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
  
Ty for the tips but i still get the same error
 
  (06-23-2012, 04:28 PM)Hartmann Wrote:   (06-23-2012, 04:17 PM)FastHunteR Wrote:  wrong function then, you need a callback.use this inside OnStart():
 SetEntityCallbackFunc("key_3", "OnPickup");
 
 Then instead of this:
 void SetEntityCallbackFunc(string& asName, string& asCallback);
 {
 AddPropImpulse("mansion_3", 0, 0, 10, "World");
 AddTimer("StopLook", 3, "LookAtDoor");
 PlaySoundAtEntity("", "unlock_door.snt", "mansion_5", 0.0f, true);
 StartPlayerLookAt("mansion35", 10, 10, "");
 }
 
 use this:
 void OnPickup(string &in asEntity, string &in type)
 {
 AddPropImpulse("mansion_3", 0, 0, 10, "World");
 AddTimer("StopLook", 3, "LookAtDoor");
 PlaySoundAtEntity("", "unlock_door.snt", "mansion_5", 0.0f, true);
 StartPlayerLookAt("mansion35", 10, 10, "");
 }
 by the way, you really want the player to look at "mansion35" or do you mean mansion_5 and you got a typo? Anyway, fix it if you got one.
 
 Also, at every PlaySoundAtEntity function, use the extension .snt at the sound name. Example:
 PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
  Ty for the tips but i still get the same error
 ok i fixed the error but now the key wont unlock mansion_5.. shit just got serios
			 
				
(This post was last modified: 06-23-2012, 04:33 PM by Hartmann.)
 |  |