Post: GSC Syntax, and error's. [What to look for]
01-29-2012, 06:58 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Well if you have made a patch, you know how annoying those errors can be. The worst part, is it doesn't explain a good job of what error it is. So I am here to explain them to you to help you find them easier.

Bad Syntax:

This usually means that brackets, or the argument is missing
    
self iPrintlnBold("Hello";

The ")" is missing at the end of that and that will give syntax error.


Unknown Function

This errors happens when a game can't call a specified thread, or argument.
    
self thread doAsains();




doAsain()
{
//stuff
}

As you can see it's doAsains, and not doAsain therefore the game cannot find the thread/argument.


Bad Token:

This happens when a text variable is missing a ".
    
if(self.name == "george);

the other " for the text variable is missing after george, and will error.


No free g_spawn:
]
This is simple when the map is maxed out with spawns, and you create another
(This usually happens to bad coding)
    
doHi()
{
self endon("death");
for(;Winky Winky
{
lol = spawn("script_model", (0,0,0);
lol setModel("com_teddy_bear");
}
}

As you can seen, it's being created in the for loop, and therefore being created like every 0.00001 seconds going over the 30(?) limit.


Maximum Child Scripts

This really only happens on pc :/ but this is when you go into a "sub" thread too many times.
    
self waittill("spawned");
self thread doA();

doA()
{
doB();
}

doB()
{
doC();
}

doC()
{
self iPrintlnBold("CRAP!");
}


As you can see it just keeps going down :/


Uninitialized Variable

This happens when a call a variable that hasn't been created yet
    
something()
{
self.black = 1;
if(self.asain == 0)
{
self.win = "yes";
}
}

As you can see, self.asain was not initiliazed, and therefore it cannot tell what the value of it is. to fix you would do this
    
something()
{
self.asain = 1;
if(self.asain == 0)
{
self.win = "yes";
}
}



If you have any more errors you would like explained just let me know, im feeling kinda retarded and just woke up, so I probably forgot a main one.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 17 users say thank you to Jakes625 for this useful post:

247Yamato, aerosoul94, Baby-panama, BuC-ShoTz, BvB-09r-_-N!c0, I Need $, KCxFTW, KingcreekS, Kush Friendly, User23434, mattyjkilledme, oC_zUnKnOwNx, Cmd-X, ICS Vortex, Tony Stark, xePixTvx, xVz
02-12-2012, 01:43 PM #2
Cmd-X
It's been awhile.
Originally posted by SatanicHispanic View Post
Well if you have made a patch, you know how annoying those errors can be. The worst part, is it doesn't explain a good job of what error it is. So I am here to explain them to you to help you find them easier.

Bad Syntax:

This usually means that brackets, or the argument is missing
    
self iPrintlnBold("Hello";

The ")" is missing at the end of that and that will give syntax error.


Unknown Function

This errors happens when a game can't call a specified thread, or argument.
    
self thread doAsains();




doAsain()
{
//stuff
}

As you can see it's doAsains, and not doAsain therefore the game cannot find the thread/argument.


Bad Token:

This happens when a text variable is missing a ".
    
if(self.name == "george);

the other " for the text variable is missing after george, and will error.


No free g_spawn:
]
This is simple when the map is maxed out with spawns, and you create another
(This usually happens to bad coding)
    
doHi()
{
self endon("death");
for(;Winky Winky
{
lol = spawn("script_model", (0,0,0);
lol setModel("com_teddy_bear");
}
}

As you can seen, it's being created in the for loop, and therefore being created like every 0.00001 seconds going over the 30(?) limit.


Maximum Child Scripts

This really only happens on pc :/ but this is when you go into a "sub" thread too many times.
    
self waittill("spawned");
self thread doA();

doA()
{
doB();
}

doB()
{
doC();
}

doC()
{
self iPrintlnBold("CRAP!");
}


As you can see it just keeps going down :/


If you have any more errors you would like explained just let me know, im feeling kinda retarded and just woke up, so I probably forgot a main one.


Uninitialized variable..?
02-12-2012, 01:49 PM #3
Default Avatar
Newelly
Guest
Originally posted by darkcarnival View Post
Uninitialized variable..?

doPlayer()
{
for(i=0;playersWinky Winky
{
}
}

unitialised variable 'player'

you need to define it

e.g:

doPlayer()
{
player = level.players.size;
for(i=0;playerWinky Winky
{

}
}

just an example minus the errors Winky Winky
02-12-2012, 02:08 PM #4
Cmd-X
It's been awhile.
Originally posted by Newelly View Post
doPlayer()
{
for(i=0;playersWinky Winky
{
}
}

unitialised variable 'player'

you need to define it

e.g:

doPlayer()
{
player = level.players.size;
for(i=0;playerWinky Winky
{

}
}

just an example minus the errors Winky Winky


Thanks, but I couldn't find it :( It's fine..
02-12-2012, 02:17 PM #5
Default Avatar
Newelly
Guest
Originally posted by darkcarnival View Post
Thanks, but I couldn't find it :( It's fine..


upload your gsc to You must login or register to view this content.
and ill have a quick look
02-12-2012, 07:55 PM #6
ICS Vortex
Between Light and Lies
Originally posted by SatanicHispanic View Post
Well if you have made a patch, you know how annoying those errors can be. The worst part, is it doesn't explain a good job of what error it is. So I am here to explain them to you to help you find them easier.

Bad Syntax:

This usually means that brackets, or the argument is missing
    
self iPrintlnBold("Hello";

The ")" is missing at the end of that and that will give syntax error.


Unknown Function

This errors happens when a game can't call a specified thread, or argument.
    
self thread doAsains();




doAsain()
{
//stuff
}

As you can see it's doAsains, and not doAsain therefore the game cannot find the thread/argument.


Bad Token:

This happens when a text variable is missing a ".
    
if(self.name == "george);

the other " for the text variable is missing after george, and will error.


No free g_spawn:
]
This is simple when the map is maxed out with spawns, and you create another
(This usually happens to bad coding)
    
doHi()
{
self endon("death");
for(;Winky Winky
{
lol = spawn("script_model", (0,0,0);
lol setModel("com_teddy_bear");
}
}

As you can seen, it's being created in the for loop, and therefore being created like every 0.00001 seconds going over the 30(?) limit.


Maximum Child Scripts

This really only happens on pc :/ but this is when you go into a "sub" thread too many times.
    
self waittill("spawned");
self thread doA();

doA()
{
doB();
}

doB()
{
doC();
}

doC()
{
self iPrintlnBold("CRAP!");
}


As you can see it just keeps going down :/


Uninitialized Variable

This happens when a call a variable that hasn't been created yet
    
something()
{
self.black = 1;
if(self.asain == 0)
{
self.win = "yes";
}
}

As you can see, self.asain was not initiliazed, and therefore it cannot tell what the value of it is. to fix you would do this
    
something()
{
self.asain = 1;
if(self.asain == 0)
{
self.win = "yes";
}
}



If you have any more errors you would like explained just let me know, im feeling kinda retarded and just woke up, so I probably forgot a main one.


This needs to be stuck Awesome face It will really help out people.
02-12-2012, 08:20 PM #7
Default Avatar
Newelly
Guest
Originally posted by xFLAMeHD
Thanks good job. Smile

---------- Post added at 09:14 PM ---------- Previous post was at 09:12 PM ----------



why do you use this smiley tree times? ("Winky Winky") :carling:


forgot to disable smileys
02-12-2012, 08:29 PM #8
Default Avatar
Newelly
Guest
Originally posted by xFLAMeHD
Just do this:

    
{
for(i=0;playersWinky Winky
{
}
}

unitialised variable 'player'

you need to define it

e.g:

doPlayer()
{
player = level.players.size;
for(i=0;playerWinky Winky
{

}
}


i really could NOT be arsed haha
02-12-2012, 08:31 PM #9
Originally posted by ForeverDamned View Post
This needs to be stuck Awesome face It will really help out people.


ask a mod too Smile

I'll be adding more Smile
02-12-2012, 08:33 PM #10
ICS Vortex
Between Light and Lies
Originally posted by SatanicHispanic View Post
ask a mod too Smile

I'll be adding more Smile


I'm trying to find one. I asked a few and they said they didn't know anything about modding, so they wouldn't stick it. I have to find one that knows something about modding :lol:

The following user thanked ICS Vortex for this useful post:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo