Alright, looks like in this case you have the entirely of the SimpleShop script twice in this file. Delete all of this from the bottom of the file:
//D0: ID of the item
//D1: Price of the item
//D2: Message that plays when the item is bought
//D3: Message that plays when you don't have enough rupees
//D4: Input type 0=A 1=B 2=L 3=R
ffc script SimpleShop{
void run(int itemID, int price, int m, int n, int input){
int loc = ComboAt(this->X,this->Y);
while(true){
while(!AgainstComboBase(loc) || !SelectPressInput(input)) Waitframe();
SetInput(input,false);
if(Game->Counter[CR_RUPEES] >= price){
Game->DCounter[CR_RUPEES] -= price;
item shpitm = CreateItemAt(itemID, Link->X, Link->Y);
shpitm->Pickup = IP_HOLDUP;
Screen->Message(m);
}
else{
Screen->Message(n);
}
Waitframe();
}
}
bool AgainstComboBase(int loc){
return Link->Z == 0 && (Link->Dir == DIR_UP && Link->Y == ComboY(loc)+8 && Abs(Link->X-ComboX(loc)) < 8);
}
}
//If you are already using the signpost script remove the code below
bool SelectPressInput(int input){
if(input == 0) return Link->PressA;
else if(input == 1) return Link->PressB;
else if(input == 2) return Link->PressL;
else if(input == 3) return Link->PressR;
}
void SetInput(int input, bool state){
if(input == 0) Link->InputA = state;
else if(input == 1) Link->InputB = state;
else if(input == 2) Link->InputL = state;
else if(input == 3) Link->InputR = state;
}
Should compile then.
It might be helpful to make a table of contents for your scripts at the top of the file. Any line with // at the start is a comment. These are ignored on compilation but help with script readability. In this case you could have a list of scripts at the top of your file like so:
// FFC Scripts: // Real NPC V2 // Simple Shop // Permanent Tiered Secrets
Then above every script you can put a label.
//================================= // Real NPC Script //=================================
This is all completely optional, I don't do it myself, but some find it helpful for keeping track of which scripts are in the file before compiling.


