the sync rate should really be a integer or a whole number and not a float or decimal point number.
your variable declaration is correct but a little hard to read.
Think about making the variable names easier to read for your own sanity.
the gosub declaration should be a : and not a ;
the variables inside the function are currently local to that function area only, unless you declared them as global.
you should really keep practicing the basics so you understand these concepts before embarking on a larger amount of code.
If your going to make a game with many instances of the same object, you should explore types with arrays.
+ Code SnippetREM MADE THIS AN INTEGER
sync rate 60
sync on
item_health(2,0,0,0)
do
gosub item_health_init
sync
loop
function item_health(ih_n,ih_x,ih_y,ih_z)
make object box ih_n,5,12,5
position object ih_n,ih_x,ih_y,ih_z
endfunction
REM CHANGED THE COLON
item_health_init:
ih_s#=ih_s#+0.5
if ih_s#=355 then ih_s#=0
REM INSERTED THE SAME NUMBER USED ABOVE IN YOUR FUNCTION
yrotate object 2,ih_s#
return