# Ultimate Noob Coding

**URL:** <https://forum.choiceofgames.com/t/ultimate-noob-coding/28655>\
**Category:** ChoiceScript Help\
**Created:** [July 12, 2017, 10:33am UTC](https://forum.choiceofgames.com/t/ultimate-noob-coding/28655 "2017-07-12T10:33:30Z")\
**Posts on this page:** 1\
**Showing post:** 431

<div class="post-metadata">

**Author:** ![Nahim\_Kerman](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nahim_kerman/32/62734_2.png) [@Nahim\_Kerman](https://forum.choiceofgames.com/u/Nahim_Kerman)\
**Post date:** [December 12, 2019, 6:01pm UTC](https://forum.choiceofgames.com/t/ultimate-noob-coding/28655/431 "2019-12-12T18:01:23Z")

</div>

hmmm…

like

```
*label somename
*set result 0

*comment the label "highest" in the "number" 
*comment scene will compare two variables and
*comment store the value (or name if you know how to 
*comment work with pointers) in the variable "result"

*gosub_scene number highest (var_1) (var_2)

*gosub_scene number highest (result) (var_3)

*gosub_scene number highest (result) (var_4)

*gosub_scene number highest (result) (var_5)

*gosub_scene number highest (result) (var_6)

*gosub_scene number highest (result) (var_7)

*gosub_scene number highest (result) (var_8)

*gosub_scene number highest (result) (var_9)

*gosub_scene number highest (result) (var_10)

*gosub_scene number highest (result) (var_11)

The higest value is: ${result}

```

but  
I highly sugest do it in a loop so it would be something like this:

```
*label somename
*set result var_1
*temp parameter ""
*temp i 1
*temp total 11

*label loop
*comment let the looping begin! (11 variables total)
*comment parameter should work as a pointer to val_x

*if (i < total)
    *set parameter ("var_"&"${i}")
    *gosub_scene number highest (result) ({parameter})
    *set i +1

    *goto loop

The higest value is: ${result}

```

Ta DAAAAAA!! 😃

By the sheer power of coding I command you to return me the Highest value among these variables!

```
*comment number.txt

*label highest
*param

*if (param_1 > param_2)
    *set result param_1
    *return

*set result param_2

*return

```

Done!

---

_[View the full topic](https://forum.choiceofgames.com/t/ultimate-noob-coding/28655)._
