Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error. missing a ";" or ","
Hartmann Offline
Member

Posts: 52
Threads: 18
Joined: Jun 2012
Reputation: 0
#5
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);
Smile
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);
Smile
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.)
06-23-2012, 04:28 PM
Find


Messages In This Thread
Error. missing a ";" or "," - by Hartmann - 06-23-2012, 03:08 PM
RE: Error. missing a ";" or "," - by Cruzore - 06-23-2012, 03:35 PM
RE: Error. missing a ";" or "," - by Hartmann - 06-23-2012, 03:58 PM
RE: Error. missing a ";" or "," - by Cruzore - 06-23-2012, 04:17 PM
RE: Error. missing a ";" or "," - by Hartmann - 06-23-2012, 04:28 PM
RE: Error. missing a ";" or "," - by Hartmann - 06-23-2012, 04:54 PM
RE: Error. missing a ";" or "," - by Cruzore - 06-23-2012, 05:02 PM
RE: Error. missing a ";" or "," - by Hartmann - 06-23-2012, 05:08 PM



Users browsing this thread: 2 Guest(s)