Some methods not available in coroutines

I am trying to use coroutines in my project, however some methods do not appear to be available when executing them. Example:


] lua_run c = coroutine.create(function(e) e:PrintMessage(HUD_PRINTTALK,"Test") end) print(coroutine.resume(c,player.GetByID( 1 )))
> c = coroutine.create(function(e) e:PrintMessage(HUD_PRINTTALK,"Test") end) print(coroutine.resume(c,player.GetByID( 1 )))...
false	[lua_run:1] attempt to call method 'PrintMessage' (a nil value)
] lua_run player.GetByID(1):PrintMessage(HUD_PRINTTALK,"Test")
> player.GetByID(1):PrintMessage(HUD_PRINTTALK,"Test")...
Test

Sometimes string.sub doesn’t work either, even though I use it with tostring().

Is there something I am missing, or are coroutines broken? They would be extremely useful for my project.

Broken, don’t bother trying.

Well, that’s frustrating. Thanks anyway though.