M
Mythic Fr0st
Guest
First the question part:
Now in php I would use a function like this (give or take a few mistakes)
how would I do this in jass? i've tried im pretty sure the (i) is in the wrong place (Error is "Expected Takes"
Also how would a run a variable though a function like
udg_s = CT(s) or something like that, in PHP
I could do s = CT(s) and it would run through the function and take effect, E.G if s was less than 10, it would show 0 and the value of s, any help plz
and can I have multiple functions in one?
function CT takes nothing returns nothing
blah
function RT takes nothing returns nothing
endfunction
endfunction?
Now in php I would use a function like this (give or take a few mistakes)
PHP:
function CT (i)
{
if i < 10
set i = "0"+i
return i
}
Code:
function CT (i) takes i returns i
if i < 10
set i = "0"+i
endif
endfunction
Also how would a run a variable though a function like
udg_s = CT(s) or something like that, in PHP
I could do s = CT(s) and it would run through the function and take effect, E.G if s was less than 10, it would show 0 and the value of s, any help plz
and can I have multiple functions in one?
function CT takes nothing returns nothing
blah
function RT takes nothing returns nothing
endfunction
endfunction?