Ok cool and in case I really need to use loop for something what is the proper way to use it if you don't need to use goto?
ok I'll wait for it
ok thank you is it the %60 after the round thing?
Ok cool and in case I really need to use loop for something what is the proper way to use it if you don't need to use goto?

It depends on the situation. There are several different types of loops that all do something slightly different.

Let's say you need to loop through a list of items without responding to changes the list:

for(var/obj/item/i in l)
//do something.


If you need to loop through a list of items while changing the list:

for(var/count=1;count<=l.len;count++)
//do something

//OR

for(var/count in 1 to l.len)
//do something


If you need to loop through every other item in a list:

for(var/count in 1 to l.len step 2)
//do something


If you need to count backwards through a list:

var/pos = l.len+1
while(--pos)"
//do something


If you need to do something with a guaranteed first-iteration:

do
//do something
while(condition)


There's no one right way to loop through a list. It depends on what the loop is trying to achieve and it comes down to logic. You have to think about the problem you are teaching the machine to solve, and then apply the simplest solution possible within the constraints of the machine's purpose.

If you don't understand the theory of what each piece of logic does, and all of the tools at your disposal, you are going to have a hard time finding a good solution.

This is why it's really best to read the materials that are provided to you before you dive right in, just so you are at least aware of what's available to you.

http://www.byond.com/docs/guide/

http://www.byond.com/docs/ref/index.html

I didn't read these when I first started out. I still haven't read them all the way through, to be honest, and it took me 13 years to really understand programming well. You can master it in 1-3 years if you start right. Otherwise, you are going to spend a lot of time making mistakes that could have been prevented.

The reference is something you don't want to read all the way through. it's something that you want to sort of peruse through after you've got the basics down, and just sort of read stuff that piques your interest. When you are trying to solve a specific problem, it's really quite helpful to search through it to figure out how things work. The guide, on the other hand is a good lazy sunday afternoon read.
I tried to tweak your code for my needed but see what it did:
http://img11.hostingpics.net/pics/942630examinfos.png
//in my var(global var)
var
next_genin_exam = world.realtime + 18000
next_chuunin_exam = world.realtime + 36000
genintime = world.realtime - next_genin_exam
chunintime = world.realtime - next_chuunin_exam
//the proc
world
proc
check_exams()
set waitfor = 0
var/time = world.realtime
while(1)
if(time>=next_genin_exam&&next_genin_exam) geninexam()
if(time>=next_chuunin_exam&&next_chuunin_exam) chuninexam()
sleep(10)

//and the stat()
stat("Exams Info: ")
stat("")
stat("Time remaining until Genin Exam: [round(genintime/600)%60] minutes and [round(genintime/10)%60] seconds!")
stat("Time remaining until Chunin Exam:[round(chunintime/36000)] hours, [round(chunintime/600)%60] minutes and [round(chunintime/10)%60] seconds! ")

//srry If I sound noob or ask you a lot of question im using you(a little bit :p) to learn things
var
genintime = world.realtime - next_genin_exam
chunintime = world.realtime - next_chuunin_exam


These lines are invalid. get rid of them.

You also should never use stat() outside of mob.Stat() or a proc called by mob/Stat().

    next_genin_exam = world.realtime + 18000
next_chuunin_exam = world.realtime + 36000


These lines are wrong too. You can't set global variables like this.
This is closer to what you need to do:

var
next_genin_exam
next_chuunin_exam

world
proc
check_exams()
set waitfor = 0
var/time = world.realtime
while(1)
if(time>=next_genin_exam&&next_genin_exam) geninexam()
if(time>=next_chuunin_exam&&next_chuunin_exam) chuninexam()
sleep(10)
New()
//put this inside your world/New() function
next_genin_exam = world.realtime + 18000
next_chuunin_exam = world.realtime + 36000
check_exams()

mob
Stat()
//put these inside your mob/Stat() function
var/time = world.realtime
stat("Exams Info: ")
stat("")
var/genintime = next_genin_exam - time
var/chuunintime = next_chuunin_exam - time
stat("Time remaining until Genin Exam: [round(genintime/600)%60] minutes and [round(genintime/10)%60] seconds!")
stat("Time remaining until Chunin Exam:[round(chuunintime/36000)] hours, [round(chuunintime/600)%60] minutes and [round(chuunintime/10)%60] seconds! ")
the stat() were already into Stat() (finally something I know :P) but didnt know I should of put the variables in a process because it had equation thank you for the specification!
and I had already put check_exams in world/New() finally another thing I knew xD (A great thank you to know idk if you find me annoying but you're really helping me thank you)
idk if you find me annoying

Not at all. We all start somewhere. Trust me, you are nowhere near as bad as I was when I first started out. I was an absolute menace back in 2001. =D I'm just very, very blunt, so it might seem like I'm always annoyed, but it's just sort of how I talk/think. I can come across very aggressive in text, but if you could hear my voice, I'm sure you'd figure out that I'm more than happy to help.

Cheers.
idk what went wrong this time: http://img15.hostingpics.net/pics/980987exam.png
world
New()
check_exams()
next_genin_exam = world.realtime + 18000
next_chuunin_exam = world.realtime + 36000
//
proc
check_exams()
set waitfor = 0
var/time = world.realtime
while(1)
if(time>=next_genin_exam&&next_genin_exam) geninexam()
if(time>=next_chuunin_exam&&next_chuunin_exam) chuninexam()
sleep(10)
//
var/time = world.realtime
stat("Exams Info: ")
stat("")
var/genintime = next_genin_exam - time
var/chuunintime = next_chuunin_exam - time
stat("Time remaining until Genin Exam: [round(genintime/600)%60] minutes and [round(genintime/10)%60] seconds!")
stat("Time remaining until Chunin Exam:[round(chuunintime/36000)] hours, [round(chuunintime/600)%60] minutes and [round(chuunintime/10)%60] seconds! ")
//idk what is wrong?
Pay close attention to my world/New() function. You implemented it incorrectly.
This part?:
    New()
//put this inside your world/New() function
next_genin_exam = world.realtime + 18000
next_chuunin_exam = world.realtime + 36000
check_exams()
//
New()
check_exams()
next_genin_exam = world.realtime + 18000
next_chuunin_exam = world.realtime + 36000
//should check_exams be after the var declare?
Why would you check the variables before you declare them?
Yes that's what I was thinking I wrote it too fast! I like the way you told me asking me to try to wonder why and not just telling me what is wrong :D!
still same error as the other screenshot D:
        next_genin_exam = world.realtime + 18000
next_chuunin_exam = world.realtime + 36000
check_exams()
//should I try to keep the default proc that called the exam:
//spawn(18000)geninexam()
//spawn(36000)chuninexam()
There are one of two possibilities. Either world/New() is never being called because you have it overridden somewhere else in your project (you didn't start fresh, like you said), or you are subtracting world.realtime in the wrong order in your Stat() proc.

You can check if a proc is being called by inserting a debug message into it:

world.log << "Put your debug message here"


And when the world starts, press F1 to open the options and messages menu to see if that message was sent.

You can also check to see why values are out of whack by using debug messages:

world.log << "[world.realtime] [next_genin_exam]"


My guess is that one or both of these things is wrong, and you need to double-check your mob/Stat() function to make sure you are subtracting the values in the right order, like I showed you above, and you need to make sure that world/New() is actually being called and not being incorrectly overridden elsewhere in your code.
I'll try these thank you for the tips I'll use it to test other proc too :D
here's the stat() if tyou want to see it:
                var/time = world.realtime
stat("Exams Info: ")
stat("")
world.log << "[world.realtime] [next_genin_exam]"
var/genintime = next_genin_exam - time
var/chuunintime = next_chuunin_exam - time
stat("Time remaining until Genin Exam: [round(genintime/600)%60] minutes and [round(genintime/10)%60] seconds!")
stat("Time remaining until Chunin Exam:[round(chuunintime/36000)] hours, [round(chuunintime/600)%60] minutes and [round(chuunintime/10)%60] seconds! ")
My guess is that you are accidentally overriding world/New() multiple times and not using the supercall operator.

This will tell you a bit about what the supercall is, and how overrides work:

http://www.byond.com/forum/?post=2008907#comment17929110
Page: 1 2 3 4 5