UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

script error (Bad syntax Help)

HOT
broken avatar :(
Created 12 years ago
by pashan
0 Members and 1 Guest are viewing this topic.
7,636 views
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
Signature
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Im getting a bad syntax error from this script on line 23 but i don't know whats wrong.

Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;



//thread shootme();
shootme(){
triggers = GetEntArray( "o1", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("ray_gun");
}
}
shotit(weapon){
currentgun = "";
while(!(currentgun==weapon)){
self waittill("trigger", player);
currentgun = player GetCurrentWeapon();
}

}

{
triggers = GetEntArray( "o2", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("ray_gun");
}
}
shotit(weapon){
currentgun = "";
while(!(currentgun==weapon)){
self waittill("trigger", player);
currentgun = player GetCurrentWeapon();
}

}

{
triggers = GetEntArray( "o3", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("ray_gun");
}
}
shotit(weapon){
currentgun = "";
while(!(currentgun==weapon)){
self waittill("trigger", player);
currentgun = player GetCurrentWeapon();
}

}

{
triggers = GetEntArray( "plan", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("blundergat");
}
}
shotit(weapon){
currentgun = "";
while(!(currentgun==weapon)){
self waittill("trigger", player);
currentgun = player GetCurrentWeapon();
}

}

{
triggers = GetEntArray( "plan", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("blundergat_upgraded");
}
}
shotit(weapon){
currentgun = "";
while(!(currentgun==weapon)){
self waittill("trigger", player);
currentgun = player GetCurrentWeapon();
}

}

{

Trig = GetEnt( "r", "targetname" );
        CanBreak = undefined;
Play = GetPlayers();
for(;;)
{
if( GetAllPlayersTrig( Trig ) )
{
Time = 0;
for(;;)
{
Time += 1;
if( !GetAllPlayersTrig( Trig ) )
break;
if( Time == 181 )
                                {
                                        CanBreak = true;
                                        break;
                                }
wait 1;
}
}
                if( CanBreak == true )
                       break;
wait .05;
}
       
}

GetAllPlayersTrig( Trig )
{
if( IsDefined( GetPlayers()[3] ) )
if( GetPlayers()[0] IsTouching( Trig ) && GetPlayers()[1] IsTouching( Trig ) && GetPlayers()[2] IsTouching( Trig ) && GetPlayers()[3] IsTouching( Trig ) )
return true;
if( IsDefined( GetPlayers()[2] ) && !IsDefined( GetPlayers()[3] ) )
if( GetPlayers()[0] IsTouching( Trig ) && GetPlayers()[1] IsTouching( Trig ) && GetPlayers()[2] IsTouching( Trig ) )
return true;
if( IsDefined( GetPlayers()[1] ) && !IsDefined( GetPlayers()[2] ) )
if( GetPlayers()[0] IsTouching( Trig ) && GetPlayers()[1] IsTouching( Trig ) )
return true;
if( IsDefined( GetPlayers()[0] ) && !IsDefined( GetPlayers()[1] ) )
if( GetPlayers()[0] IsTouching( Trig ) )
return true;
return false;
}
Last Edit: May 24, 2014, 12:19:13 am by pashan
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
Signature
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
shotit can be fine with being made once and shootme add a number after each. Also a shootme is missing under the first shotit. You seem to be missing a lot of function names.
Last Edit: May 24, 2014, 12:23:52 am by PROxFTW
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
sorry for bothering you but i don't know how to fix it.

could you possibly correct that script for me?

Im getting a bad syntax error from this script on line 23 but i don't know whats wrong.

Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;



//thread shootme();
shootme(){
triggers = GetEntArray( "o1", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("ray_gun");
}
}
shotit(weapon){
currentgun = "";
while(!(currentgun==weapon)){
self waittill("trigger", player);
currentgun = player GetCurrentWeapon();
}

}

{
triggers = GetEntArray( "o2", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("ray_gun");
}
}
shotit(weapon){
currentgun = "";
while(!(currentgun==weapon)){
self waittill("trigger", player);
currentgun = player GetCurrentWeapon();
}

}

{
triggers = GetEntArray( "o3", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("ray_gun");
}
}
shotit(weapon){
currentgun = "";
while(!(currentgun==weapon)){
self waittill("trigger", player);
currentgun = player GetCurrentWeapon();
}

}

{
triggers = GetEntArray( "plan", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("blundergat");
}
}
shotit(weapon){
currentgun = "";
while(!(currentgun==weapon)){
self waittill("trigger", player);
currentgun = player GetCurrentWeapon();
}

}

{
triggers = GetEntArray( "plan", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("blundergat_upgraded");
}
}
shotit(weapon){
currentgun = "";
while(!(currentgun==weapon)){
self waittill("trigger", player);
currentgun = player GetCurrentWeapon();
}

}

{

Trig = GetEnt( "r", "targetname" );
        CanBreak = undefined;
Play = GetPlayers();
for(;;)
{
if( GetAllPlayersTrig( Trig ) )
{
Time = 0;
for(;;)
{
Time += 1;
if( !GetAllPlayersTrig( Trig ) )
break;
if( Time == 181 )
                                {
                                        CanBreak = true;
                                        break;
                                }
wait 1;
}
}
                if( CanBreak == true )
                       break;
wait .05;
}
       
}

GetAllPlayersTrig( Trig )
{
if( IsDefined( GetPlayers()[3] ) )
if( GetPlayers()[0] IsTouching( Trig ) && GetPlayers()[1] IsTouching( Trig ) && GetPlayers()[2] IsTouching( Trig ) && GetPlayers()[3] IsTouching( Trig ) )
return true;
if( IsDefined( GetPlayers()[2] ) && !IsDefined( GetPlayers()[3] ) )
if( GetPlayers()[0] IsTouching( Trig ) && GetPlayers()[1] IsTouching( Trig ) && GetPlayers()[2] IsTouching( Trig ) )
return true;
if( IsDefined( GetPlayers()[1] ) && !IsDefined( GetPlayers()[2] ) )
if( GetPlayers()[0] IsTouching( Trig ) && GetPlayers()[1] IsTouching( Trig ) )
return true;
if( IsDefined( GetPlayers()[0] ) && !IsDefined( GetPlayers()[1] ) )
if( GetPlayers()[0] IsTouching( Trig ) )
return true;
return false;
}
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Hopefully this should fix
Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;

//thread shootme1();thread shootme2();thread shootme3();thread shootme4();thread shootme5();
shootme1(){
triggers = GetEntArray( "o1", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("ray_gun");
}
}
shootme2()
{
triggers = GetEntArray( "o2", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("ray_gun");
}
}
shootme3()
{
triggers = GetEntArray( "o3", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("ray_gun");
}
}
shootme4()
{
triggers = GetEntArray( "plan", "targetname" );
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("blundergat");
}
}
shootme5()
{
triggers = GetEntArray( "plan", "targetname" );//Change to plan1 unless you want to receive blundergat and upgraded at same time
for( i = 0; i < triggers.size; i++ ){
triggers[i] thread shotit("blundergat_upgraded");
}
}

shotit(weapon){
currentgun = "";
while(!(currentgun==weapon)){
self waittill("trigger", player);
currentgun = player GetCurrentWeapon();
}
}

Script()
{
    Trig = GetEnt( "r", "targetname" );
    CanBreak = undefined;
Play = GetPlayers();
for(;;)
{
if( GetAllPlayersTrig( Trig ) )
{
Time = 0;
for(;;)
{
Time += 1;
if( !GetAllPlayersTrig( Trig ) )
break;
if( Time == 181 )
                {
                    CanBreak = true;
                    break;
                }
wait 1;
}
}
                if( CanBreak == true )
                       break;
wait .05;
}
       
}

GetAllPlayersTrig( Trig )
{
if( IsDefined( GetPlayers()[3] ) )
if( GetPlayers()[0] IsTouching( Trig ) && GetPlayers()[1] IsTouching( Trig ) && GetPlayers()[2] IsTouching( Trig ) && GetPlayers()[3] IsTouching( Trig ) )
return true;
if( IsDefined( GetPlayers()[2] ) && !IsDefined( GetPlayers()[3] ) )
if( GetPlayers()[0] IsTouching( Trig ) && GetPlayers()[1] IsTouching( Trig ) && GetPlayers()[2] IsTouching( Trig ) )
return true;
if( IsDefined( GetPlayers()[1] ) && !IsDefined( GetPlayers()[2] ) )
if( GetPlayers()[0] IsTouching( Trig ) && GetPlayers()[1] IsTouching( Trig ) )
return true;
if( IsDefined( GetPlayers()[0] ) && !IsDefined( GetPlayers()[1] ) )
if( GetPlayers()[0] IsTouching( Trig ) )
return true;
return false;
}
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
the map loads up but now none of the zombies spawn nor i can turn on the power?
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Where did you thread the stuff at the top? I believe if you thread them in wrong spots it will not let other scripts run I believe but don't mark me on that.
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
i copyed that script and made it a new .gsc
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Still where is thread shootme1(), etc? GSC or if it is in the same one where is the gsc being initiated from?
Last Edit: May 24, 2014, 12:49:06 am by PROxFTW
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
mapname.gsc
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Now which funtion is it running through and is it at the bottom, top, middle, just some hints to see if this is the problem or something else.
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.

This is where it is
Code Snippet
Plaintext
/*--------------------
ZOMBIE MODE
----------------------*/
[[level.DLC3.weapons]]();
[[level.DLC3.powerUps]]();

maps\_zombiemode::main();

maps\_zombiemode_perks_black_ops::bo_perks_thread();

maps\triggerr::shootme();

maps\ee::ray_steps();

maps\count::main();

maps\gunre::main();

//thread anti_cheat();

/*--------------------
FUNCTION CALLS - POST _Load
----------------------*/
level.zone_manager_init_func = ::dlc3_zone_init;
level thread DLC3_threadCalls2();
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Try this. Also I don't see how the script would run how you had it but just try this and see how it works.
Here do this
Change
maps\triggerr::shootme();
to
maps\triggerr::main();
In triggerr.gsc add
Code Snippet
Plaintext
main()
{
       thread shootme1();thread shootme2();thread shootme3();thread shootme4();thread shootme5();
}
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
before you told me i tried changing it to

Code Snippet
Plaintext
main()
{
thread shootme1();
thread shootme2();
thread shootme3();
thread shootme4();
thread shootme5();
}

but it still did not work so now i am making a new map and adding it to that to see if it works
Last Edit: May 24, 2014, 01:02:56 am by pashan
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 7 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Here let me just do a quick thing and tell me if it is the same way as what I am about to say.
In mapname.gsc it should look like
Code Snippet
Plaintext
[[level.DLC3.weapons]]();
[[level.DLC3.powerUps]]();

maps\_zombiemode::main();

maps\_zombiemode_perks_black_ops::bo_perks_thread();

maps\triggerr::main();

maps\ee::ray_steps();

maps\count::main();

maps\gunre::main();
Plus the rest of the code up/down
In the triggerr.gsc it should have that code I remade plus that main code at the top. Is that how it looks?
Last Edit: May 24, 2014, 01:07:17 am by PROxFTW
broken avatar :(
×
broken avatar :(
UM Member, Mapper and 3d Modeler
Location: ca
Date Registered: 8 February 2014
Last active: 5 years ago
Posts
835
Respect
Forum Rank
The Decider
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Port Arthur
×
pashan's Groups
Mapper Has released one or more maps to the UGX-Mods community.
ya that is how it looks

 
Loading ...