my little problem - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: my little problem (/Thread-my-little-problem) |
my little problem - jexnico - 01-03-2018 04:39 PM well, i just wanted to show a [Newbie] tag on top of the newbies items, but the message is showing up on all items, even if they are not newbies 04:37:ERROR:(e_player.scp,1194)Can't resolve <attr> 04:37:ERROR:(e_player.scp,1194)Undefined symbol '' 04:37:ERROR:(e_player.scp,1194)Undefined symbol 'newbie' Quote:[EVENTS e_newbie] anyone help me? RE: my little problem - darksun84 - 01-03-2018 07:32 PM Code: [EVENTS e_newbie] For checking attr,flags and so on you must use the & operator, see http://wiki.spherecommunity.net/index.php?title=Bitwise_Operations Also inside the ATTR (or flags for character) property, you can store only values that you can find in sphere_defs.scp Suggested reading: http://wiki.spherecommunity.net/index.php?title=Chapter_1 RE: my little problem - jexnico - 01-04-2018 01:43 AM (01-03-2018 07:32 PM)darksun84 Wrote: im working it RE: my little problem - jexnico - 01-04-2018 05:12 AM i've managed to get a label to appear on top of the items inside the game, but its popping up for all items, even for the non-newbies the script stayed like this Quote:[EVENTS e_newbie] i want it to appear only for newbie items RE: my little problem - darksun84 - 01-04-2018 06:06 AM The Flags property is for characters (players and npcs), while the Attr property is for items, so you have to check for the attr property with the & operator not the == ( see http://wiki.spherecommunity.net/index.php?title=Bitwise_Operations ) Your if will look like Code: [EVENTS e_newbie] RE: my little problem - jexnico - 01-04-2018 06:30 AM (01-04-2018 06:06 AM)darksun84 Wrote: The Flags property is for characters (players and npcs), while the Attr property is for items, so you have to check for the attr property with the & operator not the == ( see http://wiki.spherecommunity.net/index.php?title=Bitwise_Operations ) worked for me!!!!!! ty dude, you is my hero |