Results 1 to 8 of 8

Thread: Println Help.

  1. #1
    Join Date
    Jun 2008
    Location
    Pennsylvania
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Println Help.

    Why can't I use Println(i) to print out values of integers? It seems to only work with strings, but when I look up actual pascal, there are examples and such all over the place of printing out an integer working. I got the feeling I'm doing something really stupid, but can someone help me? (I'm debugging random values for coord clicking, so it won't click the same spot every time)

  2. #2
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Writeln(IntToStr(I));

    Writeln = Println

    IntToStr = Integer To String

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  3. #3
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    WriteLn('string');
    WriteLn(IntToStr(Integer));



    EDIT:

    Aww Jukka beats me.. Hes smart

  4. #4
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You have to use converting functions - IntToStr(Number) - FloatToStr(Number) - etc...


  5. #5
    Join Date
    Jun 2008
    Location
    Pennsylvania
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So does the normal pascal do this automatically for you or something? As you can just use Println(int) and stuff like Println(The value of int is',int)

  6. #6
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    I don't get what ur saying..

    test this script:
    SCAR Code:
    var
      Int : Integer;
    begin
      Int := Random(500);
      WriteLn('This types a string');
      WriteLn(IntToStr(Int) + ' Is an integer');
    end.

  7. #7
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    In SCAR it is WriteLn(Word: string); We do not use PrintLn();. I think you are thinking of a different programming language ^^.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  8. #8
    Join Date
    Jun 2008
    Location
    Pennsylvania
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oops, i mean WriteLn for PrintLn. In my script I was using WriteLn, but something in my mind told me to type PrintLn =P

    Thanks for all your help guys. This thread can now be closed

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
  •