0 Members and 1 Guest are viewing this topic.
ForceAchUpdate(ID, 'TP', TP);
var Boolval:Array [1..32] of Boolean;procedure ForceAchUpdate(ID:Byte; Ach:String); //will update current accounts with new achievements to get as the players join (going to use in OnJoinTeam) begin if ReadINI('Players/'+IDtoname(ID)+'.ini','achievements',Ach,'*ERROR*') = '*ERROR*' then iniWrite('Players/'+IDtoname(ID)+'.ini','achievements',Ach,'0'); if ReadINI('Players/'+IDtoname(ID)+'.ini','achievements',Ach,'*ERROR while loading achievement*') = '1' then Boolval[ID]:=True; if ReadINI('Players/'+IDtoname(ID)+'.ini','achievements',Ach,'*ERROR while loading achievement*') = '0' then Boolval[ID]:=False; end; procedure OnJoinTeam(ID, Team: byte);begin if (Team = 1) AND (FileExists('Players/'+IDtoname(ID)+'.ini')) then beginForceAchUpdate(ID, 'TP');TP[ID] := Boolval[ID];end;end;
if ReadINI('Players/'+IDtoname(ID)+'.ini','achievements',Ach,'*ERROR while loading achievement*') = '1' then Boolval[ID]:=True; if ReadINI('Players/'+IDtoname(ID)+'.ini','achievements',Ach,'*ERROR while loading achievement*') = '0' then Boolval[ID]:=False;
if Lowercase(Text) = '/buy pred' then begin if Cash < (pred) then begin WriteConsole(0,IdtoName(ID)+' just tried to purchase predator, not enough funds!',$EE81FAA1); end; if Cash >= (pred) then begin Cash :=Cash-(pred); WriteConsole(0,IdtoName(ID)+' has just bought predator for '+(pred)+' Cash',$EE81FAA1); GiveBonus(ID, 1); SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),20); TUPred[ID]:=TUPred[ID]+1; end; end;
open round ('(')expected
constpred = 200;
if Lowercase(Text) = '/buy pred' then begin if Cash < (pred) then begin WriteConsole(0,IdtoName(ID)+' just tried to purchase predator, not enough funds!',$EE81FAA1); end; if Cash >= (pred) then begin Cash :=Cash-(pred); WriteConsole(0,IdtoName(ID)+' has just bought predator for '+IntToStr(pred)+' Cash',$EE81FAA1); GiveBonus(ID, 1); SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),20); TUPred[ID]:=TUPred[ID]+1; end; end;
if Lowercase(Text) = '/buy pred' then begin if Cash < (pred) then begin //actuall error is on this line, why isnt pred being parsed correctly? error doesnt point directly to this line, points above it, however after counting commented out lines (section it was pointing to was not changed, neither was anything above it, except for consts, and there were 15 commented out lines before that line) and adding the result number to the supposed error line (387+15=line 402) WriteConsole(0,IdtoName(ID)+' just tried to purchase predator, not enough funds!',$EE81FAA1); end; if Cash >= (pred) then begin Cash :=Cash-(pred); WriteConsole(0,IdtoName(ID)+' has just bought predator for '+IntToStr(pred)+' Cash',$EE81FAA1); GiveBonus(ID, 1); SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),20); TUPred[ID]:=TUPred[ID]+1; end; end;
edit: how do i create a bullet going from mone player to another again?, i know one of you guys posted it somewhere but i cant find, could u plz post it again? , i know it was something about the sin, cos and tan things..