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
Script help
Rakez68 Offline
Junior Member

Posts: 11
Threads: 3
Joined: Mar 2013
Reputation: 0
#1
Script help

Hello.

I need help with one script. I have 4 chemicals in a map and after picking up all the four chemicals to your inventory, you can use them on a chemistry pot which is on a table. After that, you'll be able to pick it up to your inventory and later use it.

My current script looks like this:
void OnStart()
{
for("int i=0;i<=4;i+") AddUseItemCallback("Chem"+i, "GetAcidComplete", "UsedChemsOnPot", true, 0);
}
void UsedChemsOnPot(string &in asItem, string &in asEntity)
{
{
if("asParent" == "Chem1" && GetLocalVarInt("Var1") == 1)
{
SetLocalVarInt("Var1", 1);
}
else if("asParent" == "Chem2" && GetLocalVarInt("Var1") == 1)
{
SetLocalVarInt("Var1", 1);
}
else if("asParent" == "Chem3" && GetLocalVarInt("Var1") == 1)
{
SetLocalVarInt("Var1", 1);
}
else if("asParent" == "Chem4" && GetLocalVarInt("Var1") == 1)
{
SetLocalVarInt("Var1", 1);
}
}
if(GetLocalVarInt("Var1") == 4)
{
PlayMusic("26_event_agrippa_head.ogg", false, 0.7, 0.1, 10, false);
}
}

It gives me this error right now:

FATAL ERROR: Could not load script file 'custom_stories/His dearest friend/Maps/WineCellar.hps'!
main (16, 23) : ERR :Expected ';'

And if i remove the " from ("int i=0;i<=4;i+"), it gives me this error:

FATAL ERROR: Could not load script file 'custom_stories/His dearest friend/Maps/WineCellar.hps'!
main (15, 23) : ERR : Expected ';'

It doesn't make sense..

Would really appreciate if you'd tell me is the script itself even right, and if it is, what's the problem?
(This post was last modified: 03-27-2013, 01:53 PM by Rakez68.)
03-27-2013, 01:36 PM
Find


Messages In This Thread
Script help - by Rakez68 - 03-27-2013, 01:36 PM
RE: Script help - by Adrianis - 03-27-2013, 01:56 PM
RE: Script help - by Rakez68 - 03-27-2013, 02:08 PM
RE: Script help - by Adrianis - 03-27-2013, 02:15 PM
RE: Script help - by Rakez68 - 03-27-2013, 02:46 PM
RE: Script help - by PutraenusAlivius - 03-27-2013, 02:55 PM
RE: Script help - by Rakez68 - 03-27-2013, 03:23 PM
RE: Script help - by PutraenusAlivius - 03-27-2013, 03:27 PM
RE: Script help - by Rakez68 - 03-27-2013, 03:39 PM
RE: Script help - by PutraenusAlivius - 03-27-2013, 03:40 PM
RE: Script help - by Rakez68 - 03-27-2013, 04:09 PM
RE: Script help - by Adrianis - 03-27-2013, 04:11 PM
RE: Script help - by Rakez68 - 03-27-2013, 04:50 PM
RE: Script help - by Adrianis - 03-27-2013, 05:44 PM



Users browsing this thread: 1 Guest(s)