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
if - NoMatchingSignatures
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#1
if - NoMatchingSignatures

I have an if statement that doesn't want to go as i want it to...

ERR: No matching signatures to 'ChangeCharacterMark()'
INFO: Candidates are:
INFO: void ChangeCharacterMark(string&in)

ERR: No matching signatures to 'ChangeCharacterSimon()'
INFO: Candidates are:
INFO: void ChangeCharacterSimon(string&in)


Here is the if statement:

Spoiler below!


void NextLevelCheck(string &in asEntity)
{
if(asEntity == "AreaSimon")
{
if(GetLocalVarInt("SimonReady") == 1 && GetLocalVarInt("MarkReady") == 1)
{
ChangeCharacterMark();
return;
}
}

if(asEntity == "AreaMark")
{
if(GetLocalVarInt("SimonReady") == 1 && GetLocalVarInt("MarkReady") == 1)
{
ChangeCharacterSimon();
return;
}

}

if(GetLocalVarInt("SimonReady") == 0)
{
SetMessage("Messages", "NotDone", 0);
}

if(GetLocalVarInt("MarkReady") == 0)
{
SetMessage("Messages", "NotDone", 0);
}
}


And here are the 2 scripts:

Spoiler below!


void ChangeCharacterSimon(string &in asEntity)
{
FadeOut(2);
SetPlayerActive(false);
CheckPoint("Simon", "SimonStart", "", "DeathHints", "NormalDeath");
PlaySoundAtEntity("", "insanity_whisper", "Player", 0.5f, false);
FadePlayerFOVMulTo(2, 2.0f);
AddTimer("ChangeCharacterSimonTimer", 2, "ChangeCharacterSimonTimer");
}


void ChangeCharacterMark(string &in asEntity)
{
FadeOut(2);
SetPlayerActive(false);
CheckPoint("Mark", "MarkStart", "", "DeathHints", "NormalDeath");
PlaySoundAtEntity("", "insanity_whisper", "Player", 0.5f, false);
FadePlayerFOVMulTo(2, 2.0f);
AddTimer("ChangeCharacterMarkTimer", 2, "ChangeCharacterMarkTimer");
}


I can't say what i have to do with ChangeCharacterMark(); and ChangeCharacterSimon();
Can anobody help?

EDIT: If i write something inside the () then it says "Expected ("

Trying is the first step to success.
(This post was last modified: 08-14-2012, 04:50 PM by FlawlessHappiness.)
08-14-2012, 04:34 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: if - NoMatchingSignatures

The clue is in the signatures for each function:

void ChangeCharacterSimon(string &in asEntity)
void ChangeCharacterMark(string &in asEntity)

As you can see - they are expecting a string parameter (which isn't being used inside the functions currently). The solution is to either change the signatures so they no longer use this parameter, I.e:

void ChangeCharacterSimon()
{
   //stuff...
}
void ChangeCharacterMark()
{
   //stuff...
}

OR pass a parameter in (in this case i am assuming you want to pass in "asEntity" from the calling function):
void NextLevelCheck(string &in asEntity)
{
if(asEntity == "AreaSimon")
{
if(GetLocalVarInt("SimonReady") == 1 && GetLocalVarInt("MarkReady") == 1)
{
ChangeCharacterMark(asEntity);
return;
}
}

if(asEntity == "AreaMark")
{
if(GetLocalVarInt("SimonReady") == 1 && GetLocalVarInt("MarkReady") == 1)
{
ChangeCharacterSimon(asEntity);
return;
}

}

if(GetLocalVarInt("SimonReady") == 0)
{
SetMessage("Messages", "NotDone", 0);
}

if(GetLocalVarInt("MarkReady") == 0)
{
SetMessage("Messages", "NotDone", 0);
}
}
(This post was last modified: 08-14-2012, 05:50 PM by Apjjm.)
08-14-2012, 05:49 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: if - NoMatchingSignatures

Yes! You are a genius! Thank you... I should have though of doing asEntity instead of string &in... Thank you!

Trying is the first step to success.
08-14-2012, 06:22 PM
Find




Users browsing this thread: 2 Guest(s)