Results 1 to 7 of 7

Thread: Need help, Noob is failing with script..

  1. #1
    ... connecting
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Post Need help, Noob is failing with script..

    Okay so might seem a bit rude creating an account on here to ask 1 question but please forgive me.

    Okay so i have been following a tutorial thats in a different language, and im english, so i am using google translator. I followed it fine and made the gsc, and everything in radiant as it said etc etc.. but the map gets "Bad Syntax" compile script error when i try to play it. I know what this error means, somthing wrong with one of the gsc's but becuase the tutorial i followed was in another language maybe i did something wrong, well here are the main, and secret.gsc's maybe someone can help me and i will be thankful for ever

    Main.gsc

    main()
    {
    maps\mp\_load::main();
    maps\mp\teleport::main();
    maps\mp\secret::main();



    game["allies"] = "american";
    game["axis"] = "german";
    game["attackers"] = "allies";
    game["defenders"] = "axis";
    game["american_soldiertype"] = "normandy";
    game["german_soldiertype"] = "normandy";

    setCvar("r_glowbloomintensity0", ".25");
    setCvar("r_glowbloomintensity1", ".25");
    setcvar("r_glowskybleedintensity0",".3") ;





    }

    Secret.gsc

    main ()
    {

    secret thread ();

    }

    secret ()
    {
    fall = getent ("fall", "targetname");
    trig = getent ("geheim_trig", "targetname");

    while (true)
    {
    trig wait till ("trigger", user);

    if ((user.name == "Jim") | | (user.name == "Terry") | | (user.name == "bob"))
    {
    fall notsolid ();
    }
    else
    {
    fall solid ();
    }
    }
    }

  2. #2
    Private
    Join Date
    Nov 2012
    Posts
    15
    Thanks
    3
    Thanked 18 Times in 11 Posts
    euhm in your secret gsc why not just do:

    main ()
    {
    fall = getent ("fall", "targetname");
    trig = getent ("geheim_trig", "targetname");

    while (true)
    {
    trig wait till ("trigger", user);

    if ((user.name == "Jim") | | (user.name == "Terry") | | (user.name == "bob"))
    {
    fall notsolid ();
    }
    else
    {
    fall solid ();
    }
    }
    }

  3. The Following User Says Thank You to KillerBoB For This Useful Post:

    Sexual-Healing (13th November 2012)

  4. #3
    ... connecting
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Yes it did seem odd to do so as pictured, but i was following a tutorial word for word, i shall re do script and see if this fixes the problem, Thanks Alot for your time (: !

  5. #4
    ... connecting
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Okay so i changed the gsc, im still getting script compile error bad syntax

  6. #5
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    try it this way (and please notice the [code][/code] for your next source, so other ppl can read it better)

    fixed around 4 errors and the indention:

    Code:
    main()
    {
    	thread secret();
    }
    
    secret()
    {
    	fall = getent("fall", "targetname");
    	trig = getent("geheim_trig", "targetname");
    	while (true)
    	{
    		trig waittill("trigger", user);
    		if ((user.name == "Jim") || (user.name == "Terry") || (user.name == "bob"))
    		{
    			fall notsolid ();
    		} else {
    			fall solid ();
    		}
    	}
    }
    timescale 0.01

  7. The Following User Says Thank You to kung foo man For This Useful Post:

    Sexual-Healing (13th November 2012)

  8. #6
    ... connecting
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thank you, and i am new, and wasnt sure which button allowed code.. i will rember next time for sure. This made it work, i owe you guys a bunch for even taking the time to read this thread (: thanks again!

  9. #7
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    You are welcome
    timescale 0.01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •