Results 1 to 5 of 5

Thread: int storing dtm

  1. #1
    Join Date
    Jul 2006
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default int storing dtm

    in my script i have a integer "ore1" holding the variable "tinore" (thats just one situation) and tin ore it the name of a dtm. then whenever it gets to the part where it withdraw the ore from the bank using a dtm it just stops is there a problem with my script and if so can someone help me
    SCAR Code:
    //
    //deaclares ores
    //
    procedure Declareores;
    begin
    tinore := DTMFromString('78DA63BCC5C0C0A0C8C8800C3AEBEB1858813' +
           '448F43F10305E0132F451D58064616AC0BC1398E660A8B90F2424' +
           '08A8B94BA4395A04D43C0712B2F8D50000B5AC0CAA');
    copperore := DTMFromString('78DA63E462646050026224F0B0C98A8115488' +
           '344FF0301233390A58FAA06220B23413490A54B400D1F90A54540' +
           '0D3F90A54C40CD4F20214B845DE204D488311236E73B9050C5AF0' +
           '6005AA90948');
    coalore := DTMFromString('78DA6394606660B8CCC8800CECECB4C0344C9' +
           '45100A8E604AA1A982C5C0D1B50CD55026A84806A1E1050230354' +
           '739B801A05A09AEB04D4A800D59C26A006E4F773F8D5000043FC0' +
           '831');
    ironore := DTMFromString('78DA637CCFC4C070999101190419A98169982' +
           '8E31D4C353059B89A674035C709A87907547383809AE740350F08' +
           'A8F94C845DDF806A6EE15703005DE80D09');
    goldore := DTMFromString('78DA6374646660B8C2C8800CAEAD9701D3305' +
           '1463FA09A33A86A60B270352E4035C708A83102AA3947408D0150' +
           'CD35026A6C816A1E1050E30954730BBF1A00A5F10951');
           
    end;
    //
    //declares witch ores to get
    //
    procedure whatores;
    begin
    if (typeofbar='bronze')then
       ore1:=tinore;
       ore2:=copperore;
       orenum1:='14';
       orenum2:='14';
    if (typeofbar='iron')then
       ore1:=ironore
       ore2:=ironore
       orenum1:='14';
       orenum2:='14';
    if (typeofbar='steel')then
       ore1:=ironore;
       ore2:=coalore;
       orenum1:='9';
       orenum2:='10';
    if (typeofbar='gold')then
       ore1:=goldore;
       ore2:=goldore;
       orenum1:='14';
       orenum2:='14';
    end;
       
    //
    //obtain ores from bank
    //
    procedure obtainore;
    begin
    OpenBankQuiet('akb');
    depositall;
    if (FindMSDtm(x,y,ore1))then
       cmouse(x,y,3,3,false);
       PopUp('Withdraw X');
       wait(750+random(150));
       SendText(orenum1+chr(13));
       wait(1250+random(500));
    if (FindMSDtm(x,y,tinore)=false)then
        Writeln('no ore');
    if (FindMSDtm(x,y,ore2))then
       cmouse(x,y,3,3,false);
       PopUp('Withdraw X');
       wait(750+random(150));
       SendText(orenum2+chr(13));
       wait(1250+random(500));
    if (FindMSDtm(x,y,copperore)=false)then
        Writeln('no ore');
    end;
    "your always where you supposed to be"

  2. #2
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    You can't store a string in an integer.

    Declare ore1 as a string.

  3. #3
    Join Date
    Feb 2006
    Location
    Locked in RAM's closet !
    Posts
    2,001
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    IntToStr and StrToInt yes you can
    Darky has stopped by to say hello :).
    10-21-2010
    Updated-
    10-09-2012

  4. #4
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, I was under the impression there was no need for him to store a string in an int :P

    But, FINE, yes you can use the conversion ore1 := IntToStr(tinore);

  5. #5
    Join Date
    Jul 2006
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeas but isn't a dtm an int so wouldn't ore1 have to be an int like tinore
    "your always where you supposed to be"

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. Help with storing variable
    By Drew_Dawg in forum OSR Help
    Replies: 1
    Last Post: 02-02-2008, 11:54 AM
  3. Forms and storing
    By me_ntal in forum OSR Help
    Replies: 3
    Last Post: 04-12-2007, 08:34 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
  •