Page 5 of 12 FirstFirst ... 34567 ... LastLast
Results 101 to 125 of 295

Thread: THE Beginner's Simba Tutorial

  1. #101
    Join Date
    Dec 2011
    Location
    Vancouver, Canada
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    I think this is a typo you may want to fix, Step 12 on standards:
    // Bad
    var
    Logs: Integer;
    Ores: Integer;
    Fish: Integer;

    function WalkToBank(i: Integer; j: Integer; l: string; k: string): Boolean;
    // Good
    var
    Logs, Ores, Fish: Integer;
    function WalkToBank(i, j: Integer; l, s: String): Boolean;

    That should be a "k"

    Sorry for being picky, Amazing guide, This is going to be my first step into proggraming. Learning so much right now xD

    Typo 2: Again sorry for being anal, but that must mean i'm good at spotting mistakes, that should come in handy while writting scripts. (Step 13 in standards)

    // Bad
    var
    b: Boolean;
    // Good
    var
    DoesBank: Boolean <----- Missing ";"
    Last edited by CreaShun; 12-27-2011 at 12:47 AM.

  2. #102
    Join Date
    Nov 2011
    Location
    Sacramento, California
    Posts
    366
    Mentioned
    4 Post(s)
    Quoted
    85 Post(s)

    Default

    thanks Coh3n!

    Amazing guide, though it took a while to read :P

    Everything makes a lot more sense now.

  3. #103
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by CreaShun View Post
    I think this is a typo you may want to fix, Step 12 on standards:
    // Bad
    var
    Logs: Integer;
    Ores: Integer;
    Fish: Integer;

    function WalkToBank(i: Integer; j: Integer; l: string; k: string): Boolean;
    // Good
    var
    Logs, Ores, Fish: Integer;
    function WalkToBank(i, j: Integer; l, s: String): Boolean;

    That should be a "k"

    Sorry for being picky, Amazing guide, This is going to be my first step into proggraming. Learning so much right now xD

    Typo 2: Again sorry for being anal, but that must mean i'm good at spotting mistakes, that should come in handy while writting scripts. (Step 13 in standards)

    // Bad
    var
    b: Boolean;
    // Good
    var
    DoesBank: Boolean <----- Missing ";"
    Why should the 's' be a 'k'? I'll fix the second one, thanks.

  4. #104
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    Why should the 's' be a 'k'? I'll fix the second one, thanks.
    The alphabet... i,j,k,l

    or the procedure above it
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  5. #105
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Yago View Post
    The alphabet... i,j,k,l

    or the procedure above it
    Oh, I didn't even realize I did that. I always start integers at i, and strings at s.

  6. #106
    Join Date
    Jan 2009
    Location
    Belgium
    Posts
    175
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Coh3n my old friend. Awesome to see that your tutorial is high appreciated by everyone in here. I started to refresh my srl scripting skills again (not that i was good at it before). But thanks to the tutorials you make, it is all possible without any problems ^^. Thank you for spending so much time in this.

    Regards,

    Yush Dragon

  7. #107
    Join Date
    Dec 2011
    Location
    Iceland
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks Coh3n for the great tutorial, helped me a lot!
    Keep up the good work

  8. #108
    Join Date
    Jan 2012
    Location
    Finland
    Posts
    133
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I am reading up the tutorial as I type this post. I saw that in #11 you explained the different casings weirdly.

    Pascal case: GreenButtonType
    Camel case: myInt

    You explained Pascal case as "... uppercase letter and then camel-capped."
    Either that or you just tried to avoid the confusion with overlapping names.
    Last edited by plekter; 01-12-2012 at 11:40 PM.
    Bot hard or get banned trying.

  9. #109
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by plekter View Post
    I am reading up the tutorial as I type this post. I saw that in #11 you explained the different casings weirdly.

    Pascal case: GreenButtonType
    Camel case: myInt

    You explained Pascal case as "... uppercase letter and then camel-capped."
    Either that or you just tried to avoid the confusion with overlapping names.
    I explained a Global Variable as "... uppercase letter and then camel-capped." I'm not sure what you think is weird about it?

  10. #110
    Join Date
    Jan 2012
    Location
    Finland
    Posts
    133
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think the term you were looking for was Pascal casing(starts with uppercase and all following words uppercased too). I might be totally mislooking something as the time here is 4 at night and I havent had a coffee yet.

    Just finished reading the whole tutorial and it was very helpful. I thought that Pascal's syntax will be a lot harder to grasp but it is quite easy, even thought it has some quirks(I have worked too much with C#). Can't wait to get something scripted.

    Now I just got to wrap my tired brain around SRL...
    Last edited by plekter; 01-13-2012 at 02:10 AM.
    Bot hard or get banned trying.

  11. #111
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    It's not pascal Case because there really is no defined way to case in pascal. You can do it any way you want. You can have whatever standards you want. What I outlined in the first post is just what I recommend and it's clean and easy to read.

    Um, maybe I should add a section on using SRL. Or maybe I'll save that for the intermediate tutorial if I ever get around to writing it.

  12. #112
    Join Date
    Jan 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for this! I pushed and read through it all. Pascal is weird to me, but I think I can get used to its quirks.

    I have a quick question, why do you use {$i SRL\SRL.scar} instead of {$i SRL\SRL.simba}? As far as I can understand, *.scar doesn't work in the latest version of Simba.

  13. #113
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    It's because the guide was not created during SRL5.

  14. #114
    Join Date
    Jan 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah, that makes a great deal of sense. Had to Google a bit for that, haha.

  15. #115
    Join Date
    Jan 2012
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the tut hopefully going to start my first script soon once i learn the basics of simba

  16. #116
    Join Date
    Sep 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the great guide. Working on actually going through every single part and paying attention instead of just skimming :P. But is has helped a lot!

  17. #117
    Join Date
    Nov 2011
    Posts
    67
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    thanks for the guide i hope ill become a good scripter.

  18. #118
    Join Date
    Dec 2011
    Posts
    496
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Oh damn. I think i may have found myself a new hobby... and 10 days before an exam as well!!! Great guide :')

  19. #119
    Join Date
    Dec 2011
    Location
    Kosovo
    Posts
    831
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Those taught me some good things

    Thanks

  20. #120
    Join Date
    Nov 2011
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Thank you very much Coh3n. This is the beginning of my scripting career!

  21. #121
    Join Date
    Jan 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    file 'C:\Simba\Includes\SRL/SRL/core/misc/smart.scar' i get this error when running custom scripts i don't think i have any scar files but the simba start scripts run fine just not custom please help ill +rep

  22. #122
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by usb1y View Post
    file 'C:\Simba\Includes\SRL/SRL/core/misc/smart.scar' i get this error when running custom scripts i don't think i have any scar files but the simba start scripts run fine just not custom please help ill +rep
    You have to include it like
    Simba Code:
    program new;
    {$DEFINE SMART}
    {$i srl/srl.simba}

  23. #123
    Join Date
    Jan 2012
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default what am i doning rong?

    i am a noob at scripting so much help would be greatly appreciated

  24. #124
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    The 'end' in a procedure needs to be followed by a ';' not a '.', like you have. Only the mainloop begin..end nest should be followed by a period.

  25. #125
    Join Date
    Jan 2012
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks coh3n!
    awesome guide! I think that a lot of people will agree with me on that!

    Edit:
    Found a typo:
    if (Condition) then // Notice the intent after a "begin" statement
    Should be:
    if (Condition) then // Notice the indent after a "begin" statement
    Last edited by Sassakill; 01-29-2012 at 08:32 AM.

Page 5 of 12 FirstFirst ... 34567 ... LastLast

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
  •