0 Members and 1 Guest are viewing this topic.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.
const SCRIPT_VERSION = '1.2.4.5.2b'; DATE_FORMAT = 'yyyy:mm:dd:hh:nn:ss:zzz'; MAX_SKILLS = 15; M_EVERY = 8; // Money shown every 8 kills MP_EVERY = 4; // Mana ... E_EVERY = 5; // Exp ... MK_DMG = 149; KILLS_MAX = 100; // set this two to the same value, else: KABOOM!, nah just joking MAX_KILLS = 100; CLASS_MAX = 5; CONSOLE_ = true; CONSOLE_L = 3; CONSOLE_R = 255; CONSOLE_G = 255; CONSOLE_B = 255; NORMAL_ZOMBIES = 10; // how many bots are joining server when admin types /bots, or serevr starts up BRUTAL_ZOMBIES = 4; BLOODY_ZOMBIES = 0; BURNING_ZOMBIES = 0; BOSS_ZOMBIES = 0; OMEGA_ZOMBIES = 1; MAX_ZOMBIES = 15; // total zombies {DO}MAX_EXP = 0.81; // MaxExp[ID]:= MaxExp[id] + Round ((MaxExp[id] * MAX_EXP) / MAX_EXP_DIV);{NT}MAX_EXP_DIV = 1.51; // >>>>>>>> DONT MODIFY!!! <<<<<<{ED}MAX_MANA = 0.22; // MaxMana[ID]:= MaxMana[id] + Round (MaxMana[id] * MAX_Mana);{IT}MAX_DI = 0.8629827; // DI[id] := DI[id] + MAX_DI; // <- DAMAGE INCRASE "Result := Damage + Round(Damage * DI[Shooter] / 100);"// 1600 more lines here <.<
function Aim(const X1,Y1,X2,Y2: single) : single;begin if (X2 - X1)<>0 then begin if X1 > X2 then result:= arctan((y2 - y1) / (x2 - x1)) + Pi else result:= arctan((y2 - y1) / (x2 - x1)); end else begin if Y2 > Y1 then result:= Pi/2 + Pi/4; if Y2 < Y1 then result:= -Pi/2 + Pi/4; end;end;
function Aim(const X1,Y1,X2,Y2: single) : single;begin if (X2 - X1) <> 0 then begin if X1 > X2 then begin result:= arctan((y2 - y1) / (x2 - x1)) + Pi; end else begin result:= arctan((y2 - y1) / (x2 - x1)); end; end else begin if Y2 > Y1 then result:= Pi/2 + Pi/4; if Y2 < Y1 then result:= -Pi/2 + Pi/4; end;end;
He didn't miss semicolon.Code: [Select]function Aim(const X1,Y1,X2,Y2: single) : single;begin if (X2 - X1)<>0 then begin if X1 > X2 then result:= arctan((y2 - y1) / (x2 - x1)) + Pi else result:= arctan((y2 - y1) / (x2 - x1)); end else begin if Y2 > Y1 then result:= Pi/2 + Pi/4; if Y2 < Y1 then result:= -Pi/2 + Pi/4; end;end;this code is correct. It's even better because doesn't have such a number of useless begin-end rooms.
Whenever I receive this error and don't know what I've recently modified (or if I modified different areas), what I do is comment out like half my code, try to compile it; and depending on the error, you know if you commented out the one error.
procedure iniSave(FileName: string; var iniFile: TINIFile);inisave('Players/'+GetPlayerStat(ID,'Name')+'.ini','Players/'+GetPlayerStat(ID,'Name')+'.ini');
For god's sake your programming style is cruel. Get used to a for human more readable style.Nevertheless, I pointed out a mistake:Code: [Select]function Aim(const X1,Y1,X2,Y2: single) : single;begin if (X2 - X1)<>0 then begin if X1 > X2 then result:= arctan((y2 - y1) / (x2 - x1)) + Pi else result:= arctan((y2 - y1) / (x2 - x1)); end else begin if Y2 > Y1 then result:= Pi/2 + Pi/4; if Y2 < Y1 then result:= -Pi/2 + Pi/4; end;end;You missed a semicolon in the fifth row above:result:= arctan((y2 - y1) / (x2 - x1)) + Pi;EDIT: This results into another comipilation error, therfore I cleaned up the func a bit:Code: [Select]function Aim(const X1,Y1,X2,Y2: single) : single;begin if (X2 - X1) <> 0 then begin if X1 > X2 then begin result:= arctan((y2 - y1) / (x2 - x1)) + Pi; end else begin result:= arctan((y2 - y1) / (x2 - x1)); end; end else begin if Y2 > Y1 then result:= Pi/2 + Pi/4; if Y2 < Y1 then result:= -Pi/2 + Pi/4; end;end; Your "[Error] (0:0): Variable Expected" error still occurs, but I'm not keen on fixing your code with such an evil programming style.Anyway, good luck in finding the bug(s).