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, 08:34 PM #11
Originally posted by ForeverDamned View Post
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:


I lol'd :lol:
02-14-2012, 05:38 PM #12
this is nice post thanks

---------- Post added at 12:38 PM ---------- Previous post was at 12:35 PM ----------

nice post you got here
02-14-2012, 05:43 PM #13
KingcreekS
NOTHING IS IMPOSSIBL
again a great work Hispanic, it help me alot , thankz you
02-15-2012, 04:00 AM #14
Cmd-X
It's been awhile.
Originally posted by Newelly View Post
upload your gsc to You must login or register to view this content.
and ill have a quick look


I found out why Not Happy or Sad
The script I was using was optimized, so I didn't know that there was like 4 threads in it, and I threaded something to the wrong output... thanks anyways though. Stupid little mistakes dangnammit!

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo