Page 1 of 1
Bug with strings?
Posted: Thu Sep 25, 2008 11:18 am
by Nightson
Code: Select all
var skill := Randomint(48)+1;
skill := GetAttributeIdBySkillId(skill); // Function from attributes.inc
bonus := Randomint(4)+1;
name := GetBonusNameByAttribute(skill); <== This function returns string like that "[Alchemii]"
SetObjProperty(item,"dmagic",{skill,time,bonus,name});
This script above creates item then another script ( item identification )
Code: Select all
var factor := GetObjProperty(item,"dmagic");
item.name := item.desc+""+factor[4];
And almost everrything works ok but sometimes i have item name like that (example) "Robe Unable to unpack string length. String length excessive."
i tryed to GetObjProperty Then SetObjProperty on item and in my array there was no "[Alchemii]" only Unable to unpack string length. String length excessive.
imho core bug
Re: Bug with strings?
Posted: Tue Dec 30, 2008 2:18 pm
by MuadDib
The string length excessive would be when the item is read or saved to the Data files. First, check there, as that would point to an invalid saving of the CProp itself. let me know if you can find this. (you HAVE to have the item's saved information from the txt file from BEFORE it messed up the name when POL Loaded, as we would need to see the BAD saved CProp on the item that had the [NameofAttribute] stored on before it gave the error.