Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-23-2006, 03:54 AM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
Case sensitivity in strings

Okay, so after testing around I've found out what Zodiac's problem is.

Players are able to change the capitals in their accounts.
I can log in with my account as yen, Yen, yEn, YeN, yEN, or YEn. All of them will work.
If I have something like: this.array = {"Yen","Stefan","(npc-server)"} and I do this.array.index(player.account), unless my account is Yen it will return -1
If my account is yEn, it will return a -1.
This is bugging up parties, trade, ect.

I can fix it by converting all accounts to lowercase when they're received, but is it mean't to act like this?
Reply With Quote
  #2  
Old 08-24-2006, 12:54 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Just ignore the account name sent with the trigger by the client, never trust clientside data. On serverside you can also do account = findplayer(account).account to fix it.
Reply With Quote
  #3  
Old 08-24-2006, 02:52 AM
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
Thanks.
Reply With Quote
  #4  
Old 08-24-2006, 04:34 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Whyd you use another account to post o_o
Reply With Quote
Reply


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 02:24 PM.


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