MaksoPL
Member
Posts: 51
Threads: 26
Joined: Mar 2014
Reputation:
0
|
Script Error
Error is:
main (8,1) : ERR :Expected ',' or ';'
That's my script:
void OnStart()
{
AddUseItemCallback("","ham1","board1","ActivateBrokenBoards",false);
AddEntityCollideCallback("Player","grunt_script1","Hallucination",true,1);
}
void ActivateBrokenBoards(string &in asItem, string &in asEntity)
void Hallucination(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("board1",false);
SetEntityActive("boardb1",true);
SetEntityActive("haluc1",true);
ShowEnemyPlayerPosition("haluc1");
RemoveItem("Ham1");
GiveSanityBoostSmall();
CreateParticleSystemAtEntity("","ps_cog_stone.ps","BoardParticles", false);
CreateParticleSystemAtEntity("","ps_break_mansionbase_wall.ps","BoardParticles",false);
PlaySoundAtEntity("","player_crouch","Player",0.0f,false);
PlaySoundAtEntity("","break_wood.snt","Player",0.0f,true);
}
|
|
05-24-2014, 01:11 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Script Error
Quote:void ActivateBrokenBoards(string &in asItem, string &in asEntity)
void Hallucination(string &in asParent, string &in asChild, int alState)
You have this, but you have no braces for one of them. If you need hallucination to happen in sync with the Activate Broken Boards script, then you don't need that line.
If you still need it:
void ActivateBrokenBoards(string &in asItem, string &in asEntity) { //code }
Discord: Romulator#0001
(This post was last modified: 05-24-2014, 01:19 PM by Romulator.)
|
|
05-24-2014, 01:17 PM |
|
MaksoPL
Member
Posts: 51
Threads: 26
Joined: Mar 2014
Reputation:
0
|
RE: Script Error
I added lines:
AddEntityCollideCallback("Player","grunt_script1","Hallucination",true,1);
void Hallucination(string &in asParent, string &in asChild, int alState)
SetEntityActive("haluc1",true);
ShowEnemyPlayerPosition("haluc1");
Before this I added, it worked.
(This post was last modified: 05-24-2014, 01:21 PM by MaksoPL.)
|
|
05-24-2014, 01:20 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Script Error
In that case, try this:
void OnStart() { AddUseItemCallback("","ham1","board1","ActivateBrokenBoards",false); AddEntityCollideCallback("Player","grunt_script1","Hallucination",true,1); }
void ActivateBrokenBoards(string &in asItem, string &in asEntity) { SetEntityActive("board1",false); SetEntityActive("boardb1",true); RemoveItem("Ham1"); GiveSanityBoostSmall(); CreateParticleSystemAtEntity("","ps_cog_stone.ps","BoardParticles", false); CreateParticleSystemAtEntity("","ps_break_mansionbase_wall.ps","BoardParticles",false); PlaySoundAtEntity("","player_crouch","Player",0.0f,false); PlaySoundAtEntity("","break_wood.snt","Player",0.0f,true); }
void Hallucination(string &in asParent, string &in asChild, int alState) { SetEntityActive("haluc1",true); ShowEnemyPlayerPosition("haluc1"); }
Discord: Romulator#0001
|
|
05-24-2014, 01:27 PM |
|
MaksoPL
Member
Posts: 51
Threads: 26
Joined: Mar 2014
Reputation:
0
|
RE: Script Error
Thanks again. I am a novice with custom stories.
|
|
05-24-2014, 01:29 PM |
|
DnALANGE
Banned
Posts: 1,549
Threads: 73
Joined: Jan 2012
|
RE: Script Error
Just saying...
Make 1 treadh for your problems please!
I asked a mod to take a look at your treads, nothing to worry about!
Just make 1 tread please.
ONLY if you have something other then the tread you have, you can make anotehr one.
We are here and look in all treads, if there is another issue in the same tradh, we will see and help.
ALSO if the one is fixed you can easely change the topic name into your "new" problem\question.
(This post was last modified: 05-24-2014, 02:14 PM by DnALANGE.)
|
|
05-24-2014, 02:13 PM |
|
|