Its some weird bug in the main code for functions!
As this one work as long as i dont use or pass more then 9 variabels inside an function
/////////////////////////////////////////
// Particle functions //////////////////
///////////////////////////////////////
function Particles_Initiate ( ID as integer ,IMG as integer , sz1 as integer , sz2 as integer , sz3 as integer , sz4 as integer, X as float , Y as float)
// If particles exist destroy them before creating new ones
if GetParticlesExists ( ID ) = 1
DeleteParticles ( ID )
endif
ID = CreateParticles ( X , Y )
SetParticlesImage ( ID , IMG )
SetParticlesStartZone ( ID , sz1, sz2, sz3, sz4 )
endfunction ID
function Particles_Setup (ID as integer , xDir as integer , yDir as integer , Life as float, Size as integer , Ang as integer , Rate as integer )
SetParticlesDirection ( ID , xDir , yDir )
SetParticlesLife ( ID , Life )
SetParticlesSize ( ID , Size )
SetParticlesAngle ( ID , Ang )
SetParticlesFrequency ( ID , Rate )
endfunction
// Generate some engine particles
Player.Engine = Particles_Initiate (Player.Engine, img_Particle , 0 , 0 , 0 , 0, GetSpriteX ( Player.ID ) , GetSpriteY ( Player.ID )+ (GetSpriteHeight( Player.ID )/2))
Particles_Setup ( Player.Engine, -50 , 0 , 0.3 , 16 , 80 , 60 )
Quote: "But yes, this is weird. What actually happens when you try to return the variable, do you get an error? or does nothing happen at all?"
It simply freezes when i try to run the code.
The compiler dosent say anything?
Could it be that i mix floats and integers?
Some kind of limitation of memory usage?
floats use more memory then integers well ?