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
Script Issues
Gilligan's Hell Offline
Posting Freak

Posts: 851
Threads: 17
Joined: Feb 2012
Reputation: 36
#1
Question  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
(This post was last modified: 08-08-2013, 06:16 AM by Gilligan's Hell.)
08-08-2013, 06:13 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#2
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

[Image: Tv0YgQb.gif]
Image by BandyGrass
(This post was last modified: 08-08-2013, 06:22 AM by Kreekakon.)
08-08-2013, 06:21 AM
Find
Gilligan's Hell Offline
Posting Freak

Posts: 851
Threads: 17
Joined: Feb 2012
Reputation: 36
#3
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
(This post was last modified: 08-08-2013, 06:25 AM by Gilligan's Hell.)
08-08-2013, 06:23 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#4
RE: Script Issues

Haha get some sleep. It'll definitely benefit your work in the long run Smile

[Image: Tv0YgQb.gif]
Image by BandyGrass
08-08-2013, 06:27 AM
Find
Gilligan's Hell Offline
Posting Freak

Posts: 851
Threads: 17
Joined: Feb 2012
Reputation: 36
#5
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
(This post was last modified: 08-08-2013, 06:41 AM by Gilligan's Hell.)
08-08-2013, 06:28 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Script Issues

SetMessage only takes three parameters (string, string, float).

Tutorials: From Noob to Pro
(This post was last modified: 08-08-2013, 10:09 AM by Your Computer.)
08-08-2013, 10:08 AM
Website Find
Gilligan's Hell Offline
Posting Freak

Posts: 851
Threads: 17
Joined: Feb 2012
Reputation: 36
#7
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
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#8
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)
[Image: k6vbdhu]

Aculy iz dolan.
08-08-2013, 10:23 PM
Find
Gilligan's Hell Offline
Posting Freak

Posts: 851
Threads: 17
Joined: Feb 2012
Reputation: 36
#9
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
(This post was last modified: 08-08-2013, 10:29 PM by Gilligan's Hell.)
08-08-2013, 10:28 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#10
RE: Script Issues

Ok then, post your .lang file.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
08-08-2013, 11:11 PM
Find




Users browsing this thread: 1 Guest(s)