Crash on launch issue - Related to Text Labels
#1

Right. So I've got this thing going where when you buy a FamilyHQ, it'll create a icon and 3D text label there. Only issue is, it crashes the server on launch. Also there's a couple tag mismatches with the create label thing, which I honestly don't see what's wrong with them, as they're written out the same way as any other is.

pawn Код:
cache_get_row(i,21,id_string);
        Families[i][EFamilyIcon] = strval(id_string);//This is for the family ID shit - Might be problem line
       
        cache_get_row(i,22,id_string);
        Families[i][EFamilyText] = strval(id_string);//Lets hope this works eh? - Might be problem line
       
        LoadFamilyCars(Families[i][EFamilySQLID]);
       
        new msg[255]; - All down I know is where the problem is somehow
        Families[i][EFamilyIcon] = CreateDynamicPickup(1314, 16, Families[i][EFamilyHQX], Families[i][EFamilyHQY], Families[i][EFamilyHQZ], 0, 0);
        format(msg, sizeof(msg), "[Property: {00BFFF}Family HQ{FFFFFF}]\n[Owner: {00BFFF}%s{FFFFFF}]", Families[i][EFamilyName]);
        Families[i][EFamilyText] = CreateDynamic3DTextLabel(msg, 0xFFFFFFFF, Families[i][EFamilyHQX], Families[i][EFamilyHQY], Families[i][EFamilyHQZ]+1.0, 10.0);
This is when they buy the HQ
pawn Код:
Families[fid][EFamilyIcon] = CreateDynamicPickup(1314, 16, Families[fid][EFamilyHQX], Families[fid][EFamilyHQY], Families[fid][EFamilyHQZ], 0, 0);
            new updateQuery[255];
            format(updateQuery, sizeof(updateQuery), "[Property: {00BFFF}Family HQ{FFFFFF}]\n[Owner: {00BFFF}%s{FFFFFF}]", Families[fid][EFamilyName]);
            Families[fid][EFamilyText] = CreateDynamic3DTextLabel(updateQuery, 0xFFFFFFFF, Families[fid][EFamilyHQX], Families[fid][EFamilyHQY], Families[fid][EFamilyHQZ]+1.0, 10.0);

This is where it saves. Also a tag mismatch in there, works perfectly when i remove the tags though :S
pawn Код:
saveFamily(familyid) {
    new msg[256];
    format(msg, sizeof(msg), "UPDATE `families` SET `hq` = %d, `hqx` = %f, `hqy` = %f, `hqz` = %f, `iconid` = %d, `text` = %f WHERE `id` = %d", Families[familyid][EFamilyHQID], Families[familyid][EFamilyHQX], Families[familyid][EFamilyHQY], Families[familyid][EFamilyHQZ], Families[familyid][EFamilyIcon], Families[familyid][EFamilyText], Families[familyid][EFamilySQLID]);
    mysql_function_query(g_mysql_handle, msg, true, "EmptyCallback", "");  
}
Reply
#2

Show the declaration of Families.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)