The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
(ABANDONED)Need help with "if" functions...
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#1
(ABANDONED)Need help with "if" functions...

Okay, I KNOW I'm doing this wrong, but I need some pointers on the "if" function. Here's my script:
//_______________________________

void OnStart()
{
AddEntityCollideCallback("Player", "warnarea", "warn_func", false, 0);
}

void warn_func(string &in asParent, string &in asChild, int alState)
{
GetLocalVarString("jacket_1");
{
if(&in asEntity == true)
{
SetMessage("ScreenMessages", "warningmessage", 3);
}
if(&in asEntity == false)
{
SetMessage("ScreenMessages", "none", 1);
}
}
}

//__________________

The problem is what is in the parenthesis after the "if"s I don't know what I should title it. The thing I want it to do is when I walk into an area, if the "jacket_1" is active, the message from "if(&in asEntity == true)" tells me it needs to be gone. but if the jacket is inactive, the message does not display.
(This post was last modified: 11-24-2011, 03:32 AM by Statyk.)
11-23-2011, 10:20 PM
Find


Messages In This Thread
(ABANDONED)Need help with "if" functions... - by Statyk - 11-23-2011, 10:20 PM
RE: Need help with "if" functions... - by Statyk - 11-24-2011, 12:00 AM
RE: Need help with "if" functions... - by Statyk - 11-24-2011, 02:17 AM
RE: Need help with "if" functions... - by Statyk - 11-24-2011, 01:45 AM



Users browsing this thread: 1 Guest(s)