Frictional Games Forum (read-only)

Full Version: What's wrong with this script?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Sorry guys, I just can't find out why this script won't work.

Spoiler below!
PHP Code:
void BlueRodFunc (string &in asItemstring &in asEntity)
{
    
RemoveItem(asItem);
    
SetEntityActive("BlueStatic"true);
    
AddGlobalVarInt("rodmachine"1);
    
GetGlobalVarInt("rodmachine");
    {
    if(
GetGlobalVarInt("rodmachine") == 0)
    
//..
    
}
    if(
GetGlobalVarInt("rodmachine") == 1)
    {
    
//..
    
}
    if(
GetGlobalVarInt("rodmachine") == 2)
    {
    
//..
    
}
    if(
GetGlobalVarInt("rodmachine") == 3)
    {
    
SetMessage("Messages""DoneRodsQuestM"0);
    
CompleteQuest("rodq""RodsQuest"); 
    }



Any ideas?
GetGlobalVarInt("rodmachine");
{
if(GetGlobalVarInt("rodmachine") == 0)
//..
}

Switch the if line and the opening brace. Also GetGlobalVarInt("rodmachine"); does nothing by itself. No reason to have it there.
(02-27-2012, 10:50 AM)palistov Wrote: [ -> ]GetGlobalVarInt("rodmachine");
{
if(GetGlobalVarInt("rodmachine") == 0)
//..
}

Switch the if line and the opening brace. Also GetGlobalVarInt("rodmachine"); does nothing by itself. No reason to have it there.
Thanks man!