Function returning string crash pawncc
#1

Hi, I've this function :
Код:
_GetWeaponName(weaponid)
{
    if(weaponid > 54)
    {
        return "(unused)";//gWeaponName[52]
    }
    return gWeaponName[weaponid];
}
return "(unused)"; crash pawncc during compilation (pawncc don't say anything, I got an empty box), I must return a var. Why ?
Reply
#2

Just add "unused" as weaponid 55 in your array, then if (weaponid > 54) weaponid = 55;
Reply
#3

I already do something like that, I'm asking why it crash pawncc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)