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 Help script function
ZyLogicX Offline
Member

Posts: 245
Threads: 24
Joined: May 2011
Reputation: 6
#1
script function

Im getting an error which states: "main: (1,733) ERR: A function with the same name and parameters already exist."

This is the script...

void OnEnter()
{
}

void OnStart()
{
AddEntityCollideCallback("Player", "WTH_Quest_Area", "GetWTHQuest", true, 1);
AddEntityCollideCallback("Player", "WTH_Complete_Area", "FinishWTHQuest", true, 1);
AddEntityCollideCallback("Player", "Wonder_Quest_Area", "GetWonderQuest", true, 1);
AddEntityCollideCallback("Player", "Wonder_Complete_Area", "FinishWonderQuest", true, 1);
}

void GetWTHQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("wthquest", "WthQuest");
}
void FinishWTHQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("wthquest", "WthQuest");
}
void GetWonderQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("wonderquest", "WonderQuest");
}
void FinishWTHQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("wonderquest", "WonderQuest");
}

void OnLeave()
{
}

Beyond the Mountains of Madness [15%]
This forum is dying.
(This post was last modified: 01-06-2012, 05:33 PM by ZyLogicX.)
01-06-2012, 05:31 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: script function

You have declared two functions (of identical signature) with the same name:

void OnEnter()
{
}

void OnStart()
{
AddEntityCollideCallback("Player", "WTH_Quest_Area", "GetWTHQuest", true, 1);
AddEntityCollideCallback("Player", "WTH_Complete_Area", "FinishWTHQuest", true, 1);
AddEntityCollideCallback("Player", "Wonder_Quest_Area", "GetWonderQuest", true, 1);
AddEntityCollideCallback("Player", "Wonder_Complete_Area", "FinishWonderQuest", true, 1);
}

void GetWTHQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("wthquest", "WthQuest");
}
void FinishWTHQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("wthquest", "WthQuest");
}
void GetWonderQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("wonderquest", "WonderQuest");
}
void FinishWTHQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("wonderquest", "WonderQuest");
}

void OnLeave()
{
}

I am assuming the last part should read:

void FinishWonderQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("wonderquest", "WonderQuest");
}


(This post was last modified: 01-06-2012, 05:56 PM by Apjjm.)
01-06-2012, 05:55 PM
Find
ZyLogicX Offline
Member

Posts: 245
Threads: 24
Joined: May 2011
Reputation: 6
#3
RE: script function

Thats kind of stupid actually..... my mistake.... thanks

Beyond the Mountains of Madness [15%]
This forum is dying.
01-07-2012, 12:57 AM
Find




Users browsing this thread: 1 Guest(s)