error:
(https://www.dropbox.com/s/s9b0m9dv3k6bijj/senariocrashafterremovecompany.PNG?dl=1)
How to know if the player is null ?, I use player_x(pl).is_active()?
Surely you could test the value?
local po = player_x(pl)
if (po) {
// stuff that needs po to exist
}
[CODE]
@DrSuperGood: No. This is a design flaw of the scripting api (by myself). It would need some minor changes.
@Yona: could you please always copy the relevant scripting code into your bug reports? Are you sure, you got the order of the parameters right?
if ((pl-2)<num && pl!=0 && pl!=1 && pl!=14)
{
if (playersave[pl-2].plsave==null && !tile_x(coord_label1[pl-2].x, coord_label1[pl-2].y, coord_label1[pl-2].z).find_object(mo_label))
{
local c_label = {x=coord_label1[pl-2].x, y=coord_label1[pl-2].y}
label_x.create(c_label, player_x(pl), translate("Entre player number (1-12)"))
player_x(pl).book_cash(10000)
}
}