Basic script but... - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Basic script but... (/Thread-Basic-script-but) |
Basic script but... - Onirim - 12-31-2012 02:02 AM It's a very basic script, and unfortunately I've a problem with it. I've a gump menu for character creation, and I want to put some items on chars with the attribute newbie. So I've dont that: Code: [DIALOG d_creation_class BUTTON] Code: 16:49:ERROR:(creation.scp,367)Undefined keyword 'ITEMNEWBIE' What the hell ? RE: Basic script but... - Mordaunt - 12-31-2012 02:21 AM You may find that this is because of the fact that you are creating the character via a gump rather than in the normal way: From spherewiki Code: In any case, this is another file that a lot of questions are asked about. "How do I make players start with 10000 gold?" people ask. Or, "How do I give all blacksmiths 800 ingots?" Now, I'm not saying I would like to play on a shard where you start with 10000 gold or blacksmiths start with 800 ingots. But this file would be the place to do it. However a work around would be to create the item and set it's attributes manually Code: NEWITEM=i_book_SM Make sure that the items do actually bounce to the player also. RE: Basic script but... - Onirim - 12-31-2012 02:45 AM Thank you very much I hope this thread can be usefull for all new Sphere scripters (like me, on some ways...) RE: Basic script but... - Onirim - 12-31-2012 05:30 PM Damn... I've some other problems with Sphere Script ^^ When a character is created with my creation gump, the character gain a TAG.PEUPLE = something So I don't want the creation menu open at every connection, and I put this on an player_event script: Code: on=@login But when the character have a TAG.PEUPLE = something (ex: Telorien), the script doesn't work and sphere send me: Code: 08:25:ERROR:(sphere_events_players.scp,335)Undefined symbol 'Telorien' Why I've an undefined symbol ? I just make a IF on a TAG... no ? RE: Basic script but... - Onirim - 12-31-2012 08:29 PM Okay, the TAG must be a INT, if not, it create an error. It's strange, TAGs are STRING, but they work only with an INT in a IF :/ RE: Basic script but... - Ben - 01-01-2013 01:09 AM If you just want to check weather the tag is there or not just do IF !(TAG0.PEUPLE) //<---means if the tag is not there Sphere can't handle strings in equations RE: Basic script but... - RanXerox - 01-01-2013 01:22 PM I suspect Ben meant to say: IF !(<TAG0.PEUPLE>) RE: Basic script but... - Ben - 01-02-2013 06:19 AM ya, what RanXerox said |