Results 1 to 4 of 4

Thread: Progress Report

  1. #1
    Join Date
    Dec 2011
    Location
    United States
    Posts
    960
    Mentioned
    21 Post(s)
    Quoted
    504 Post(s)

    Default Progress Report

    Im really confused. How would you create a progress report for a script. I looked for a tutorial but I couldn't find one anywhere. I am creating a fishing script that catches swordfish and tuna. I was think of creating a dtm for each of them in order to count the amount caught after a full inventory but I do not know the code to count the amount of something in your inventory. Also what code do you use to write on the screen of smart?

  2. #2
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    1,784
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    you have to add global variables to count various things, then create a procedure that prints them out.

    Currently: Working on Defending&Attacking in my Castle-Wars Script
    Project Rebuild: 90M/170M

  3. #3
    Join Date
    Dec 2011
    Location
    United States
    Posts
    960
    Mentioned
    21 Post(s)
    Quoted
    504 Post(s)

    Default

    Ok. But what command would you use to print it on the screen?
    Edit:
    Nvm. I found it. Thanks anyway

  4. #4
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    To gather data for the progress report, use the Inc() procedure when you validate that a fish has been caught:

    Simba Code:
    var
      FishCaught: integer;

    ...
    if CatchFish then Inc(FishCaught);
    ...

    Then when you want to display how many fish have been caught, use the WriteLn() procedure:

    Simba Code:
    WriteLn('Fish Caught:' + IntToStr(FishCaught));
    // the IntToStr() procedure is used to convert the FishCaught variable
    // from an integer to a string since the WriteLn() procedure requires a string.

    EDIT: 'd

Thread Information

Users Browsing this Thread

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

Posting Permissions

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