Gilligan's Hell
Posting Freak
Posts: 851
Threads: 17
Joined: Feb 2012
Reputation:
36
|
Script Issues
I Don't understand, i keep getting that fucking Unexpected token error whenever i load my map.
Script:
void OnStart()
{
SetEntityPlayerLookAtCallback("", "memory", "looking", false);
}
void looking(string &in asEntity, int alState);
{
SetMessage("", "Messages", "Iremember", 10)
}
I'm only really good a mapping, i'm shit at scripting.
void PhonographScare(string &in EntityName, int alState);
{
if(alState == 1) ///revised int alCount to int alState
{
PlaySoundAtEntity("", "broken_music_box.ogg", "Phonograph_1", 5.0f, false);
SetPropStaticPhysics("Phonograph_1", true);
}
}
void OnEnter()
{
}
void OnLeave()
{
}
I Really need help here.
The International Narcotics Traffic
|
|
08-08-2013, 06:13 AM |
|
Kreekakon
Pick a god and pray!
Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation:
124
|
RE: Script Issues
SetMessage("", "Messages", "Iremember", 10)
You're missing a semi colon here. It should be:
SetMessage("", "Messages", "Iremember", 10);
Also is this the full script? If so, then I don't see anything calling the PhonographScare function
(This post was last modified: 08-08-2013, 06:22 AM by Kreekakon.)
|
|
08-08-2013, 06:21 AM |
|
Gilligan's Hell
Posting Freak
Posts: 851
Threads: 17
Joined: Feb 2012
Reputation:
36
|
RE: Script Issues
Tried it, Didn't work. Got the same error.
(08-08-2013, 06:21 AM)Kreekakon Wrote: SetMessage("", "Messages", "Iremember", 10)
You're missing a semi colon here. It should be:
SetMessage("", "Messages", "Iremember", 10);
Also is this the full script? If so, then I don't see anything calling the PhonographScare function
How could i have missed that. as i said, I Fucking suck at scripting, also i haven't slept for 32 hours.
The International Narcotics Traffic
|
|
08-08-2013, 06:23 AM |
|
Kreekakon
Pick a god and pray!
Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation:
124
|
RE: Script Issues
Haha get some sleep. It'll definitely benefit your work in the long run
|
|
08-08-2013, 06:27 AM |
|
Gilligan's Hell
Posting Freak
Posts: 851
Threads: 17
Joined: Feb 2012
Reputation:
36
|
RE: Script Issues
Yeah. I'll try to fix the script after i get some sleep.
Ok now its giving me a "No Matching signatures" error.
The International Narcotics Traffic
|
|
08-08-2013, 06:28 AM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Script Issues
SetMessage only takes three parameters (string, string, float).
(This post was last modified: 08-08-2013, 10:09 AM by Your Computer.)
|
|
08-08-2013, 10:08 AM |
|
Gilligan's Hell
Posting Freak
Posts: 851
Threads: 17
Joined: Feb 2012
Reputation:
36
|
RE: Script Issues
Ok now its a different issue, It gives me a Unexpected End of File error.
Script:
void OnStart()
{
SetEntityPlayerLookAtCallback("Paintingher", "looking", false);
AddUseItemCallback("", "billard_key", "billarddoor", "UseKeyOnDoor", true);
}
void Lockedbillard(string &in entity)
{
if(GetSwingDoorLocked("billarddoor",) == true)
{
SetMessage("Messages", "Lockeddoor", 6);
}
}
void looking(string &in asEntity, int alState){
SetMessage("Messages", "Memory", 9);
}
void OnEnter()
{
}
void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("billarddoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
void PhonographScare(string &in EntityName, int alState)
{
if(alState == 1) ///revised int alCount to int alState
{
PlaySoundAtEntity("", "broken_music_box.ogg", "Phonograph_1", 5.0f, false);
SetPropStaticPhysics("Phonograph_1", true);
}
}
void OnLeave()
{
}
The International Narcotics Traffic
|
|
08-08-2013, 10:01 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: Script Issues
(08-08-2013, 10:01 PM)Havervahn Wrote: Ok now its a different issue, It gives me a Unexpected End of File error.
Script:
void OnStart()
{
SetEntityPlayerLookAtCallback("Paintingher", "looking", false);
AddUseItemCallback("", "billard_key", "billarddoor", "UseKeyOnDoor", true);
}
void Lockedbillard(string &in entity)
{
if(GetSwingDoorLocked("billarddoor",) == true)
{
SetMessage("Messages", "Lockeddoor", 6);
}
}
void looking(string &in asEntity, int alState){
SetMessage("Messages", "Memory", 9);
}
void OnEnter()
{
}
void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("billarddoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
void PhonographScare(string &in EntityName, int alState)
{
if(alState == 1) ///revised int alCount to int alState
{
PlaySoundAtEntity("", "broken_music_box.ogg", "Phonograph_1", 5.0f, false);
SetPropStaticPhysics("Phonograph_1", true);
}
}
void OnLeave()
{
}
void OnStart()
{
SetEntityPlayerLookAtCallback("Paintingher", "looking", false);
AddUseItemCallback("", "billard_key", "billarddoor", "UseKeyOnDoor", true);
}
void Lockedbillard(string &in entity)
{
if(GetSwingDoorLocked("billarddoor") == true)
{
SetMessage("Messages", "Lockeddoor", 6);
}
}
void looking(string &in asEntity, int alState)
{
SetMessage("Messages", "Memory", 9);
}
void OnEnter()
{
}
void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("billarddoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}
void PhonographScare(string &in EntityName, int alState)
{
if(alState == 1) ///revised int alCount to int alState
{
PlaySoundAtEntity("", "broken_music_box.ogg", "Phonograph_1", 5.0f, false);
SetPropStaticPhysics("Phonograph_1", true);
}
}
void OnLeave()
{
}
It should be fixed now, I removed an innecessary "," and added a missing {.
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
08-08-2013, 10:23 PM |
|
Gilligan's Hell
Posting Freak
Posts: 851
Threads: 17
Joined: Feb 2012
Reputation:
36
|
RE: Script Issues
Thanks! That fixed the Script issue. Okay the only issue i'm having now is that the messages aren't showing.
The International Narcotics Traffic
|
|
08-08-2013, 10:28 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: Script Issues
Ok then, post your .lang file.
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
08-08-2013, 11:11 PM |
|
|