Results 1 to 2 of 2

Thread: Help with storing variable

  1. #1
    Join Date
    Feb 2007
    Posts
    142
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with storing variable

    how would i make a function store the result as a variable?

    as in GetHP:=(A); or something like that

    this way i can set a statement like
    SCAR Code:
    begin
      GetHp(A);
      begin
        if (FindColor(xf, yf, 65280, 217, 129, 297, 209)) then
        begin
          GetHp(B);
          if ((GetHp(A)-GetHp(B))>0) then
          begin
            Result:=True;
            etc.....

    sorry i'm a noob and thanks in advance for any help

  2. #2
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    If it's an already set function that outputs something, then you do
    a:=Function;
    so in your case, it would be:
    SCAR Code:
    begin
      a:=GetHp;
      begin
        if (FindColor(xf, yf, 65280, 217, 129, 297, 209)) then
        begin
          b:=GetHp;
          if ((a-b>0) then
          begin
            Result:=True;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Storing coords
    By Prince in forum OSR Help
    Replies: 8
    Last Post: 02-23-2008, 04:58 PM
  2. Is there any variable like...?
    By dritar in forum OSR Help
    Replies: 2
    Last Post: 10-05-2007, 06:07 PM
  3. Forms and storing
    By me_ntal in forum OSR Help
    Replies: 3
    Last Post: 04-12-2007, 08:34 AM
  4. int storing dtm
    By del_signo in forum OSR Help
    Replies: 4
    Last Post: 03-05-2007, 02:03 AM

Posting Permissions

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