Results 1 to 10 of 10

Thread: Weird CoD2 Script error/bug

  1. #1
    Private MeGaBooM's Avatar
    Join Date
    Sep 2013
    Location
    germany
    Posts
    42
    Thanks
    22
    Thanked 20 Times in 9 Posts

    Weird CoD2 Script error/bug

    Hi,
    I get some weird bug when i try testing my map.
    This bug happens when i add my ambient sound in the script: ambientPlay("airplane");
    If i remove that line, the error still appears and i have to delete that .gsc and add an other .gsc (without the ambientPlay thing)

    The error: ******* script compile error *******
    bad token 'ï': (file 'maps/mp/mp_plane.gsc', line 1)
    main()

    Script:

    main()
    {
    maps\mp\_load::main();
    thread geilerBebenEffekt();
    ambientPlay("ambient_france");




    setExpFog(0.0001, 0.55, 0.6, 0.55, 0);

    ambientPlay("ambient_france");
    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");
    }

    geilerBebenEffekt()
    {
    level endon("endmap");

    while(1) { //Endlosschleife, das Script darin wird immer wieder ausgeführt (mit ner unten mit 'wait' angegebenen Wartezeit dazwischen)
    wait randomInt(120) + 360; //zuerst mal warten, mindestens 6 Minuten, dazu 0 bis 120 Sekunden zufällige Zeit sodass das erste Beben irgendwann nach 6 bis 8 Minuten kommt
    thread machGeilenBebenEffekt(); //gleich geht's um die Wurscht
    }
    }

    machGeilenBebenEffekt()
    {
    staerke = 1;
    dauer = 5;
    ausgangspunkt = (0, 0, 0);
    radius = 4096;
    schwerkraft = getCvar("g_gravity");
    setCvar("g_gravity", "200");
    earthquake(staerke, dauer, ausgangspunkt, radius); //lass wackeln!
    wait dauer;
    setCvar("g_gravity", schwerkraft);
    }


    Maybe the error is somehow in the .csv so i post it here too:

    name,sequence,file,vol_min,vol_max,vol_mod,pitch_m in,pitch_max,dist_min,dist_max,channel,type,probab ility,loop,masterslave,loadspec,subtitle,compressi on,secondaryaliasname,volumefalloffcurve,startdela y,speakermap,reverb,lfe percentage


    airplane,,ambient/mp_airplane/ambient.mp3,0.63,,,,,,,local,streamed,,looping,,mp _airplane


    I already asked some ppl but they have no idea too :/

  2. #2
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    Did you maybe script it in WordPad?

    By default it saves files in RTF (Rich Text Format) for formatting purposes it does adds some extra formatting information even to .txt files on saving and it causes errors like yours, just use notepad or notepad++ much better.

  3. #3
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 295 Times in 188 Posts
    there might be an invisible charackter before your main()
    delete the first line and write it new
    maybe copy'n'paste it to another editor to see them

  4. #4
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    More Information just looked up in google some information about WordPad: webdesign.about.com/od/notepad/a/notepad-not-wordpad.htm

  5. #5
    Private MeGaBooM's Avatar
    Join Date
    Sep 2013
    Location
    germany
    Posts
    42
    Thanks
    22
    Thanked 20 Times in 9 Posts
    i use default windows editor not notepad ++

  6. #6
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,677
    Thanks
    17
    Thanked 1,014 Times in 638 Posts
    did you use notepad ("kladblok" in dutch) or wordpad ("wordpad" in dutch)?
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  7. #7
    Private MeGaBooM's Avatar
    Join Date
    Sep 2013
    Location
    germany
    Posts
    42
    Thanks
    22
    Thanked 20 Times in 9 Posts
    in german its "textdokument". i use it and then save as .gsc so i guess its notepad

  8. #8
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 295 Times in 188 Posts
    Quote Originally Posted by MeGaBooM View Post
    in german its "textdokument". i use it and then save as .gsc so i guess its notepad
    download either notepad++ or sublime text
    you really shouldnt use the default texteditor nor wordpad...
    it makes you writing code 10x faster

    if you dont: you should prefer wordpad imho

    Attachment 669

  9. #9
    Private MeGaBooM's Avatar
    Join Date
    Sep 2013
    Location
    germany
    Posts
    42
    Thanks
    22
    Thanked 20 Times in 9 Posts
    Just downloaded notepad++, the script works now with ambientPlay, well at least i dont get any errors but ingame theres still no sound :/

  10. #10
    Private MeGaBooM's Avatar
    Join Date
    Sep 2013
    Location
    germany
    Posts
    42
    Thanks
    22
    Thanked 20 Times in 9 Posts
    Well, everything works fine now, BIG THANKS to Pollo and thanks for the ppl who helped here

Tags for this Thread

Posting Permissions

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