Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-27-2006, 10:52 PM
Loakey_P2P Loakey_P2P is offline
SL Oldbie
Loakey_P2P's Avatar
Join Date: Apr 2006
Location: U.S.A
Posts: 137
Loakey_P2P is an unknown quantity at this point
Send a message via AIM to Loakey_P2P Send a message via Yahoo to Loakey_P2P
command format

im having problems with the format of a string . its for an inventory to break them down into different sections . i already have the buttons and all that done but the part to only show npcs starting with a certain name .

if (player.weapons[ i].name.starts("Q/"SPC thiso.selec SPC"/"))

this.selec is the varable that cointains the middle part of the npc name . which would be either Item , Spell , Prize or Weapon . but it wont show those npcs , ive tracked it down to this . any idea's ?
__________________
Shaded Legend Playerworld
-Past accounts - LoakeyTheElf - Loakey_P2P
-Past Servers - Rune - Sparitoria - Shaded Legends
-Past Sl Jobs * ET/LAT/NAT/LAT Admin/Developer/Admin/Head Admin/Asst. Manager/Manager
-Current Job - Retired

*Sorry you must have mistaken me for someone that cares .
Reply With Quote
  #2  
Old 12-27-2006, 10:58 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by Loakey_P2P View Post
im having problems with the format of a string . its for an inventory to break them down into different sections . i already have the buttons and all that done but the part to only show npcs starting with a certain name .

if (player.weapons[ i].name.starts("Q/"SPC thiso.selec SPC"/"))

this.selec is the varable that cointains the middle part of the npc name . which would be either Item , Spell , Prize or Weapon . but it wont show those npcs , ive tracked it down to this . any idea's ?
SPC = space, so its searching for a weapon naped "Q/ whatever /", use @ instead.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #3  
Old 12-27-2006, 10:59 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
You confuse me.
I'm guessing this is your problem..
The SPC operator adds a space. So, it would look for Q/ Spell /
I'm assuming what you want is Q/Spell/, in which case you would want the @ operator instead of SPC. @ just adds the variable, it doesn't put a space in.
And just for the sake of knowing, the NL operator inserts a line break.
Reply With Quote
  #4  
Old 12-27-2006, 11:17 PM
Loakey_P2P Loakey_P2P is offline
SL Oldbie
Loakey_P2P's Avatar
Join Date: Apr 2006
Location: U.S.A
Posts: 137
Loakey_P2P is an unknown quantity at this point
Send a message via AIM to Loakey_P2P Send a message via Yahoo to Loakey_P2P
yea , that solved the problem . the first time i tryed to use @ i must have screwed up else where couse it didnt work . but its working now . thanks .
__________________
Shaded Legend Playerworld
-Past accounts - LoakeyTheElf - Loakey_P2P
-Past Servers - Rune - Sparitoria - Shaded Legends
-Past Sl Jobs * ET/LAT/NAT/LAT Admin/Developer/Admin/Head Admin/Asst. Manager/Manager
-Current Job - Retired

*Sorry you must have mistaken me for someone that cares .
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.