Author Topic: Script compilation error "Variable Expected"  (Read 1234 times)

0 Members and 2 Guests are viewing this topic.

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Script compilation error "Variable Expected"
« on: November 09, 2007, 11:18:34 am »
Code: [Select]
07-11-09 17:15:07    Console Log Started
07-11-09 17:15:07 Loaded weapons mod "Miracle Mod weapons v1.0"
07-11-09 17:15:07 Welcome to Soldat 1.4.2
07-11-09 17:15:07  [*] ScriptCore v2.1 loaded! Found 2 scripts...
07-11-09 17:15:07  [*] Compiling default -> MiracleMod.pas...
07-11-09 17:15:07  [*] default -> [Error] (0:0): Variable Expected


Well... what the heck is wrong?

My script starts (from the very beginning) as follows:

Code: [Select]
const
  cGood = $96FFAA;
  cBad  = $F05A23;
  cPick = $CCFF55;
  cWarn = $FF2532;
  cLvl  = $00FF44;
  cEP   = $9F9C92;
  cBlue = $91A1E1;
  cPurp = $B7479A;
  cTeal = $8FD2C4;
  cYell = $D1CF7C;
 
  //Classnumbers
  Censored       =  1;
  Censored       =  2;
  Censored       =  3;
  Censored       =  4;
  Censored       =  5;
  Censored       =  6;
  Censored       =  7;
  Censored       =  8;
  Censored       =  9;
  Censored       = 10;
  Censored       = 11;
  Censored       = 12;
  Censored       = 13;
  Censored       = 14;
  Censored       = 15;
  Censored       = 16;
  Censored       = 17;
  Censored       = 18;
  Censored       = -1;
  Censored       = -2;
  Censored       = -4;
  Censored       = -5;
 
  //Cursenumbers
  Darkblast = 1;
  Oppression= 2;
  Parasite  = 3;
  Doom      = 4;
  Maelstrom = 5;
  Mindrot   = 6;
  Stasis    = 7;
  Chirurgic = 8;
 
  //Objectnumbers
  Landmine         = 1;
  RemoteExplosives = 2;
  SentryGun        = 3;
  LivingFlame      = 4;

  IniName = 'MiracleConfig.ini';
  ScriptVersion = '0.2';
  NumClasses = 15;
  BleedThreshold = 40;
  BleedWeak = 3;
  BleedStrong = 7;
  ScythePower = 690;
  NovaStyle = 14;
  NovaOuterRingDistance = 130;
  FlagzoneRange = 100;
  SentryGunRange = 700;
  SentryGunDamage = 20;
  SentryGunSetupTime = 1;
  RecyclingHealing = 150;
  DemonkinRegeneration = 40;
  BeamOfLightSpeed = 25;
  BeamOfLightDamage = 1;
 
//Weapons
  FISTS = 0;
  DEAGLES = 1;
  MP5 = 2;
  AK74 = 3;
  STEYR = 4;
  SPAS = 5;
  RUGER = 6;
  M79 = 7;
  BARRETT = 8;
  MINIMI = 9;
  MINIGUN = 10;
  SOCOM = 11;
  KNIFE = 12;
  SAW = 13;
  LAW = 14;

type tCurse = record
                owner,cursetype: byte;
                duration: integer;
              end;


...
...
...



Some other types and global variable declaration and then the whole script follows.
I censored class names to prevent spoil.
« Last Edit: November 09, 2007, 11:20:40 am by Avarax »
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: Script compilation error "Variable Expected"
« Reply #1 on: November 09, 2007, 01:27:49 pm »
Code: [Select]
07-11-09 17:15:07  [*] default -> [Error] (0:0): Variable Expected
It says default, is that the code on the default script?
urraka

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Script compilation error "Variable Expected"
« Reply #2 on: November 09, 2007, 01:49:56 pm »
Code: [Select]
07-11-09 17:15:07  [*] default -> [Error] (0:0): Variable Expected
It says default, is that the code on the default script?

Quote
07-11-09 17:15:07   Compiling default -> MiracleMod.pas...
07-11-09 17:15:07   default -> [Error] (0:0): Variable Expected
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline sai`ke

  • Camper
  • ***
  • Posts: 318
  • Can't be arsed to remove christmas avatar
Re: Script compilation error "Variable Expected"
« Reply #3 on: November 09, 2007, 02:23:29 pm »
I doubt that bit is the problem man, given that the list of classes doesn't contain a word that isn't reserved. It compiles just fine here.

What else is there in the includes list? How many lines is the script (maybe there's some sort of unwritten maximum)? When did the problem start occurring? Can't you go back a (few) version(s) and roughly check what you changed? Try commenting stuff that you changed out in the newest version?
« Last Edit: November 09, 2007, 02:31:01 pm by sai`ke »
#soldat.ttw #ttw.gather --- Quakenet!
http://ttwforums.com

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Script compilation error "Variable Expected"
« Reply #4 on: November 09, 2007, 08:18:17 pm »
I say randomly comment large amounts of code, if it compiles, then you know the bug is not within the commented out area :) Thats if the script was working, and all of a sudden stopped wanting to work.

Offline sai`ke

  • Camper
  • ***
  • Posts: 318
  • Can't be arsed to remove christmas avatar
Re: Script compilation error "Variable Expected"
« Reply #5 on: November 09, 2007, 09:07:48 pm »
What he said /\ ;)

Although, I do realise it can be frustrating at times.
#soldat.ttw #ttw.gather --- Quakenet!
http://ttwforums.com

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Script compilation error "Variable Expected"
« Reply #6 on: November 10, 2007, 07:20:23 am »
Fixed already... I used
function bla(var bleh: integer):integer;
and the var messed it up.
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline sai`ke

  • Camper
  • ***
  • Posts: 318
  • Can't be arsed to remove christmas avatar
Re: Script compilation error "Variable Expected"
« Reply #7 on: November 10, 2007, 08:42:25 am »
Hehe ok, glad to hear that.
#soldat.ttw #ttw.gather --- Quakenet!
http://ttwforums.com

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Script compilation error "Variable Expected"
« Reply #8 on: November 13, 2007, 12:41:08 pm »
This looks awesome already, good luck with it (I could never do something like this :P )

when it is finished, where will the server be hosted?
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."