Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved What's wrong with this script?
Author Message
Shadowfied Offline
Senior Member

Posts: 262
Joined: Jul 2010
Reputation: 5
Post: #1
What's wrong with this script?
Sorry guys, I just can't find out why this script won't work.

Spoiler below!
PHP Code: (Select All)
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?

Current - Castle Darkuan
Other - F*cked Map
(This post was last modified: 02-27-2012 12:08 PM by Shadowfied.)
02-27-2012 10:35 AM
Find all posts by this user Quote this message in a reply
palistov Offline
Posting Freak

Posts: 1,175
Joined: Mar 2011
Reputation: 56
Post: #2
RE: What's wrong with this script?
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.

(This post was last modified: 02-27-2012 10:51 AM by palistov.)
02-27-2012 10:50 AM
Find all posts by this user Quote this message in a reply
Shadowfied Offline
Senior Member

Posts: 262
Joined: Jul 2010
Reputation: 5
Post: #3
RE: What's wrong with this script?
(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!

Current - Castle Darkuan
Other - F*cked Map
02-27-2012 10:53 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)