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
MY CAPS LOCK BUTTON BROKE
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#1
MY CAPS LOCK BUTTON BROKE

it keeps getting me 4 error messages, did I do something wrong on missed anything or did I miss to add something?


void PickupKey(string &in asEntity, string &in asItem)

{ AddQuest("quest1", "TestQuest");
AddUseItemCallback("", "MasterBedroomKey", "bedroomdoor","UseMasterBedroomKey", true);

AddEntityCollideCallback("Player", "AreaMemento", "EventQuest", true, 1);

}
void UseMasterBedroomKey(string &in asItem, string &in asEntity)

{

SetMessage("message", "message1", 3);
}


AddTimer("", 1.1, "TimerDoorCanClose");
{

void TimerDoorCanClose(string &in asTimer)

SetSwingDoorDisableAutoClose("Door", false);
}



{
AddUseItemCallback("", "Crowbar", "Door", "UseCrowbarOnDoor", true);
AddEntityCollideCallback("Joint", "AreaBreak", "BreakDoor", true, 1);
}

void UseCrowbarOnDoor(string &in asItem, string &in asEntity)
{
RemoveItem(asItem);
PlaySoundAtEntity("", "player_crouch.snt", "Player", 0.05, false);
AddTimer(asEntity, 0.2, "TimerPlaceCrowbar");
}

void TimerPlaceCrowbar(string &in asTimer)
{
SetEntityActive("Joint", true);
PlaySoundAtEntity("", "puzzle_place_jar.snt", asTimer, 0, false);
}

void BreakDoor(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Joint", false);
SetEntityActive("Broken", true);

SetSwingDoorLocked("Door", false, false);
SetSwingDoorClosed("Door", false, false);
SetSwingDoorDisableAutoClose("Door", true);

AddPropImpulse("Door", 0, 0, 3, "world");

CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "Areaeffect", false);
PlaySoundAtEntity("", "break_wood_metal", "Areaeffect", 0, false);

GiveSanityBoostSmall();

PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);

AddTimer("", 0.1, "TimerPushDoor");
}

void TimerPushDoor(string &in asTimer)
{
AddPropImpulse("Door", -4, 2, 1, "world");
AddTimer("", 1.1, "TimerDoorCanClose");
}

void TimerDoorCanClose(string &in asTimer)
{
SetSwingDoorDisableAutoClose("Door", false);




void touchdoor(string &in asEntity, string &in type)
{
AddQuest("door", "touchdoor");
}


void EventQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("area", "enterarea");
}

void touchdoor(string &in asEntity)
{
AddQuest("door", "touchdoor");
}
(This post was last modified: 12-23-2013, 01:26 AM by Traggey.)
12-23-2013, 12:04 AM
Find Reply
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#2
RE: CUSTOM STORY ERROR MESSAGES!

AddTimer("", 1.1, "TimerDoorCanClose"); -> void AddTimer("", 1.1, "TimerDoorCanClose");
-
Nothing to void here :
{
AddUseItemCallback("", "Crowbar", "Door", "UseCrowbarOnDoor", true);
AddEntityCollideCallback("Joint", "AreaBreak", "BreakDoor", true, 1);
}
-
void TimerDoorCanClose(string &in asTimer)
{
SetSwingDoorDisableAutoClose("Door", false); -> Missing }

-
Where are your voice onstart and Voide onleave?

You must Always start with
void onStart {}
(This post was last modified: 12-23-2013, 12:12 AM by DnALANGE.)
12-23-2013, 12:10 AM
Find Reply
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#3
RE: CUSTOM STORY ERROR MESSAGES!

[quote='DnALANGE' pid='278023' dateline='1387753857']
AddTimer("", 1.1, "TimerDoorCanClose"); -> void AddTimer("", 1.1, "TimerDoorCanClose");
-
Nothing to void here :
{
AddUseItemCallback("", "Crowbar", "Door", "UseCrowbarOnDoor", true);
AddEntityCollideCallback("Joint", "AreaBreak", "BreakDoor", true, 1);
}
-
void TimerDoorCanClose(string &in asTimer)
{
SetSwingDoorDisableAutoClose("Door", false); -> Missing }

-
Where are your voice onstart and Voide onleave?

You must Always start with
void onStart {}
[/qunow I've got 3 errors Sad
12-23-2013, 12:38 AM
Find Reply
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#4
RE: CUSTOM STORY ERROR MESSAGES!

Let me fix something here give me a sec
I will make it so it will NOT crash and you can work on the map.
BRB
12-23-2013, 12:49 AM
Find Reply
Kullin Offline
Member

Posts: 218
Threads: 23
Joined: May 2013
Reputation: 3
#5
RE: CUSTOM STORY ERROR MESSAGES!

(12-23-2013, 12:49 AM)DnALANGE Wrote: Let me fix something here give me a sec
I will make it so it will NOT crash and you can work on the map.
BRB
He has something sneaky going on here Wink
12-23-2013, 12:51 AM
Find Reply
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#6
RE: CUSTOM STORY ERROR MESSAGES!

PHP Code: (Select All)
void OnStart()
{
}

void PickupKey(string &in asEntitystring &in asItem)

AddQuest("quest1""TestQuest");
AddUseItemCallback("""MasterBedroomKey""bedroomdoor","UseMasterBedroomKey"true);
AddEntityCollideCallback("Player""AreaMemento""EventQuest"true1);
}
 
void UseMasterBedroomKey(string &in asItemstring &in asEntity)
{
SetMessage("message""message1"3);
}

void NAMETHISYOURTIMER(string &in asTimer)
{
AddTimer(""1.1"TimerDoorCanClose");
}

 
void TimerDoorCanClose(string &in asTimer)
{
SetSwingDoorDisableAutoClose("Door"false);
}

void WHATYOUWANTTOHAPPNHERE(string &in asTimer)

AddUseItemCallback("""Crowbar""Door""UseCrowbarOnDoor"true);
AddEntityCollideCallback("Joint""AreaBreak""BreakDoor"true1);
}

 
void UseCrowbarOnDoor(string &in asItemstring &in asEntity)
{
RemoveItem(asItem);
PlaySoundAtEntity("""player_crouch.snt""Player"0.05false);
AddTimer(asEntity0.2"TimerPlaceCrowbar");


void TimerPlaceCrowbar(string &in asTimer)
{
SetEntityActive("Joint"true);
PlaySoundAtEntity("""puzzle_place_jar.snt"asTimer0false);
}

 
void BreakDoor(string &in asParentstring &in asChildint alState)
{
SetEntityActive("Joint"false);
SetEntityActive("Broken"true);
SetSwingDoorLocked("Door"falsefalse);
SetSwingDoorClosed("Door"falsefalse);
SetSwingDoorDisableAutoClose("Door"true);
AddPropImpulse("Door"00,3"world");
CreateParticleSystemAtEntity("""ps_hit_wood.ps""Areaeffect"false);
PlaySoundAtEntity("""break_wood_metal""Areaeffect"0false);
GiveSanityBoostSmall();
PlayMusic("10_puzzle01.ogg"false0.70.110false);
AddTimer(""0.1"TimerPushDoor");


void TimerPushDoor(string &in asTimer)
{
AddPropImpulse("Door", -421"world");
AddTimer(""1.1"TimerDoorCanClose");
}

 
void TimerDoorCanClose(string &in asTimer)
{
SetSwingDoorDisableAutoClose("Door"false);
}

 
void touchdoor(string &in asEntitystring &in type)
{
AddQuest("door""touchdoor");
}
 
void EventQuest(string &in asParentstring &in asChildint alState)
{
AddQuest("area""enterarea");


void touchdoor(string &in asEntity)
{
AddQuest("door""touchdoor");
}
 
 
 
void OnLeave()
{


Edit ; Haven't got time now to really test, Finished my FC mod..
If there are any errors let me\us know here.
I'll check some often here.
Good luck!
(This post was last modified: 12-23-2013, 12:58 AM by DnALANGE.)
12-23-2013, 12:53 AM
Find Reply
Romulator Offline
Not Tech Support ;-)

Posts: 3,626
Threads: 62
Joined: Jan 2013
Reputation: 195
#7
RE: CUSTOM STORY ERROR MESSAGES!

I went through the OP code and corrected most of your errors. Some of them you will have to fix on your own because I do not know exactly where they have to go, or why they are there. I commented any changes and notes you need to take care of. I also did some aligning so I could understand your coding a little better.

I also noticed DnALANGE beat me to it Tongue Though either of ours should suffice, unspoiler mine if you need to Smile
Spoiler below!

PHP Code: (Select All)
void OnStart()                                                                        //The AddCallbacks were not within a void. Placed within OnStart().
    

    
AddUseItemCallback("""Crowbar""Door""UseCrowbarOnDoor"true);
    
AddEntityCollideCallback("Joint""AreaBreak""BreakDoor"true1);
    }

void PickupKey(string &in asEntitystring &in asItem)
    { 
    
AddQuest("quest1""TestQuest");
    
AddUseItemCallback("""MasterBedroomKey""bedroomdoor","UseMasterBedroomKey"true);
    
AddEntityCollideCallback("Player""AreaMemento""EventQuest"true1);
    }                                                                            
//Missing closing brace


void UseMasterBedroomKey(string &in asItemstring &in asEntity)
    {
    
SetMessage("message""message1"3.0f);            //Changed from integer to float. Does not affect the way it is run however.
    
}


AddTimer(""1.1"TimerDoorCanClose");                    //AddTimer() can only be used within a routine (void). Collide with a scriptarea if necessary. Move it or give it a void as necessary.
                                                        //Moved brace to under the below void.

void TimerDoorCanClose(string &in asTimer)
    {
    
SetSwingDoorDisableAutoClose("Door"false);
    }


void UseCrowbarOnDoor(string &in asItemstring &in asEntity)
    {
    
RemoveItem(asItem);
    
PlaySoundAtEntity("""player_crouch.snt""Player"0.05false);
    
AddTimer(asEntity0.2"TimerPlaceCrowbar");
    }

void TimerPlaceCrowbar(string &in asTimer)
    {
    
SetEntityActive("Joint"true);
    
PlaySoundAtEntity("""puzzle_place_jar.snt"asTimer0false);
    }

void BreakDoor(string &in asParentstring &in asChildint alState)
    {
    
SetEntityActive("Joint"false);
    
SetEntityActive("Broken"true);
    
SetSwingDoorLocked("Door"falsefalse);
    
SetSwingDoorClosed("Door"falsefalse);
    
SetSwingDoorDisableAutoClose("Door"true);
    
AddPropImpulse("Door"003"world");
    
CreateParticleSystemAtEntity("""ps_hit_wood.ps""Areaeffect"false);
    
PlaySoundAtEntity("""break_wood_metal""Areaeffect"0false);
    
GiveSanityBoostSmall();
    
PlayMusic("10_puzzle01.ogg"false0.70.110false);
    
AddTimer(""0.1"TimerPushDoor");
    }

void TimerPushDoor(string &in asTimer)
    {
    
AddPropImpulse("Door", -421"world");
    
AddTimer(""1.1"TimerDoorCanClose");
    }

//void TimerDoorCanClose(string &in asTimer)                    //This code has been used before. May cause errors when called again in code.
//{                                                                //It is easier to call a new timer and use that instead.
//SetSwingDoorDisableAutoClose("Door", false);                    //And it is missing a closing brace :P
//}

void touchdoor(string &in asEntitystring &in type)
    {
    
AddQuest("door""touchdoor");
    }


void EventQuest(string &in asParentstring &in asChildint alState)
    {
    
AddQuest("area""enterarea");
    }

void touchdoor(string &in asEntity)                                //You cannot name two routines after the same void. Change this to touchdoor_2 or something.
    
{                                                            //You will need to change any codes/messages as well which point to here.
    
AddQuest("door""touchdoor");
    } 


If you find you cannot read it well because of browser limitations, download it from here

Discord: Romulator#0001
[Image: 3f6f01a904.png]
12-23-2013, 01:11 AM
Find Reply
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#8
RE: CUSTOM STORY ERROR MESSAGES!

(12-23-2013, 12:53 AM)DnALANGE Wrote:
PHP Code: (Select All)
void OnStart()
{
}

void PickupKey(string &in asEntitystring &in asItem)

AddQuest("quest1""TestQuest");
AddUseItemCallback("""MasterBedroomKey""bedroomdoor","UseMasterBedroomKey"true);
AddEntityCollideCallback("Player""AreaMemento""EventQuest"true1);
}
 
void UseMasterBedroomKey(string &in asItemstring &in asEntity)
{
SetMessage("message""message1"3);
}

void NAMETHISYOURTIMER(string &in asTimer)
{
AddTimer(""1.1"TimerDoorCanClose");
}

 
void TimerDoorCanClose(string &in asTimer)
{
SetSwingDoorDisableAutoClose("Door"false);
}

void WHATYOUWANTTOHAPPNHERE(string &in asTimer)

AddUseItemCallback("""Crowbar""Door""UseCrowbarOnDoor"true);
AddEntityCollideCallback("Joint""AreaBreak""BreakDoor"true1);
}

 
void UseCrowbarOnDoor(string &in asItemstring &in asEntity)
{
RemoveItem(asItem);
PlaySoundAtEntity("""player_crouch.snt""Player"0.05false);
AddTimer(asEntity0.2"TimerPlaceCrowbar");


void TimerPlaceCrowbar(string &in asTimer)
{
SetEntityActive("Joint"true);
PlaySoundAtEntity("""puzzle_place_jar.snt"asTimer0false);
}

 
void BreakDoor(string &in asParentstring &in asChildint alState)
{
SetEntityActive("Joint"false);
SetEntityActive("Broken"true);
SetSwingDoorLocked("Door"falsefalse);
SetSwingDoorClosed("Door"falsefalse);
SetSwingDoorDisableAutoClose("Door"true);
AddPropImpulse("Door"00,3"world");
CreateParticleSystemAtEntity("""ps_hit_wood.ps""Areaeffect"false);
PlaySoundAtEntity("""break_wood_metal""Areaeffect"0false);
GiveSanityBoostSmall();
PlayMusic("10_puzzle01.ogg"false0.70.110false);
AddTimer(""0.1"TimerPushDoor");


void TimerPushDoor(string &in asTimer)
{
AddPropImpulse("Door", -421"world");
AddTimer(""1.1"TimerDoorCanClose");
}

 
void TimerDoorCanClose(string &in asTimer)
{
SetSwingDoorDisableAutoClose("Door"false);
}

 
void touchdoor(string &in asEntitystring &in type)
{
AddQuest("door""touchdoor");
}
 
void EventQuest(string &in asParentstring &in asChildint alState)
{
AddQuest("area""enterarea");


void touchdoor(string &in asEntity)
{
AddQuest("door""touchdoor");
}
 
 
 
void OnLeave()
{


Edit ; Haven't got time now to really test, Finished my FC mod..
If there are any errors let me\us know here.
I'll check some often here.
Good luck!
Thanks but now it's getting me only one error and it's saying
"A Function with the same name and parameters already exist"

does that mean I have a code that is repeated twice?, cause I don't see a code that has been written twice, do you?
(This post was last modified: 12-23-2013, 01:30 AM by Radical Batz.)
12-23-2013, 01:13 AM
Find Reply
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#9
RE: CUSTOM STORY ERROR MESSAGES!

Use Romulator's script.

"Veni, vidi, vici."
"I came, I saw, I conquered."
12-23-2013, 01:17 AM
Find Reply
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#10
RE: CUSTOM STORY ERROR MESSAGES!

(12-23-2013, 01:11 AM)Romulator Wrote: I went through the OP code and corrected most of your errors. Some of them you will have to fix on your own because I do not know exactly where they have to go, or why they are there. I commented any changes and notes you need to take care of. I also did some aligning so I could understand your coding a little better.

I also noticed DnALANGE beat me to it Tongue Though either of ours should suffice, unspoiler mine if you need to Smile
Spoiler below!

PHP Code: (Select All)
void OnStart()                                                                        //The AddCallbacks were not within a void. Placed within OnStart().
    

    
AddUseItemCallback("""Crowbar""Door""UseCrowbarOnDoor"true);
    
AddEntityCollideCallback("Joint""AreaBreak""BreakDoor"true1);
    }

void PickupKey(string &in asEntitystring &in asItem)
    { 
    
AddQuest("quest1""TestQuest");
    
AddUseItemCallback("""MasterBedroomKey""bedroomdoor","UseMasterBedroomKey"true);
    
AddEntityCollideCallback("Player""AreaMemento""EventQuest"true1);
    }                                                                            
//Missing closing brace


void UseMasterBedroomKey(string &in asItemstring &in asEntity)
    {
    
SetMessage("message""message1"3.0f);            //Changed from integer to float. Does not affect the way it is run however.
    
}


AddTimer(""1.1"TimerDoorCanClose");                    //AddTimer() can only be used within a routine (void). Collide with a scriptarea if necessary. Move it or give it a void as necessary.
                                                        //Moved brace to under the below void.

void TimerDoorCanClose(string &in asTimer)
    {
    
SetSwingDoorDisableAutoClose("Door"false);
    }


void UseCrowbarOnDoor(string &in asItemstring &in asEntity)
    {
    
RemoveItem(asItem);
    
PlaySoundAtEntity("""player_crouch.snt""Player"0.05false);
    
AddTimer(asEntity0.2"TimerPlaceCrowbar");
    }

void TimerPlaceCrowbar(string &in asTimer)
    {
    
SetEntityActive("Joint"true);
    
PlaySoundAtEntity("""puzzle_place_jar.snt"asTimer0false);
    }

void BreakDoor(string &in asParentstring &in asChildint alState)
    {
    
SetEntityActive("Joint"false);
    
SetEntityActive("Broken"true);
    
SetSwingDoorLocked("Door"falsefalse);
    
SetSwingDoorClosed("Door"falsefalse);
    
SetSwingDoorDisableAutoClose("Door"true);
    
AddPropImpulse("Door"003"world");
    
CreateParticleSystemAtEntity("""ps_hit_wood.ps""Areaeffect"false);
    
PlaySoundAtEntity("""break_wood_metal""Areaeffect"0false);
    
GiveSanityBoostSmall();
    
PlayMusic("10_puzzle01.ogg"false0.70.110false);
    
AddTimer(""0.1"TimerPushDoor");
    }

void TimerPushDoor(string &in asTimer)
    {
    
AddPropImpulse("Door", -421"world");
    
AddTimer(""1.1"TimerDoorCanClose");
    }

//void TimerDoorCanClose(string &in asTimer)                    //This code has been used before. May cause errors when called again in code.
//{                                                                //It is easier to call a new timer and use that instead.
//SetSwingDoorDisableAutoClose("Door", false);                    //And it is missing a closing brace :P
//}

void touchdoor(string &in asEntitystring &in type)
    {
    
AddQuest("door""touchdoor");
    }


void EventQuest(string &in asParentstring &in asChildint alState)
    {
    
AddQuest("area""enterarea");
    }

void touchdoor(string &in asEntity)                                //You cannot name two routines after the same void. Change this to touchdoor_2 or something.
    
{                                                            //You will need to change any codes/messages as well which point to here.
    
AddQuest("door""touchdoor");
    } 


If you find you cannot read it well because of browser limitations, download it from here

thanks but is the code that you put fixed? like ready? or I have to read the script and fix it myself?
(This post was last modified: 12-23-2013, 01:22 AM by Radical Batz.)
12-23-2013, 01:20 AM
Find Reply




Users browsing this thread: 1 Guest(s)