Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-25-2006, 10:52 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
keyname()

PHP Code:
echo("keycode of a: " getkeycode("a"));
echo(
"keyname of a: " keyname(getkeycode("a"))); 
this says

keycode of a: 65
keyname of a:

shouldn it be

keycode of a: 65
keyname of a: a

?(clientside) =(
Reply With Quote
  #2  
Old 09-25-2006, 10:54 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
I think there was some problem with keyname in the past.. It's only clientside, maybe?

Try #k(int)
Reply With Quote
  #3  
Old 09-25-2006, 11:22 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
ehr
that (clientside) at the end should express that im trying it clientside o.o
and i dont really use gs1 =/ it doesnt fit well with gs1

any other idea?
Reply With Quote
  #4  
Old 09-25-2006, 11:31 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
It's a hack. I'm pretty sure I had to use #k() instead of keyname() for something.
Reply With Quote
  #5  
Old 09-26-2006, 10:37 AM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
PHP Code:
echo("keycode of a: " getkeycode("a"));
echo(
"keyname of a: " #k(65)); 
same result:
keycode of a: 65
keyname of a:

Last edited by projectigi; 09-26-2006 at 10:37 AM.. Reason: tag fix
Reply With Quote
  #6  
Old 09-26-2006, 04:21 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
It's #K for the keyname, not #k.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #7  
Old 09-26-2006, 11:07 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
ah that works, thanks
now why didnt keyname() work? Oo
Reply With Quote
  #8  
Old 09-28-2006, 07:08 PM
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
a Keycode cannot be directly converted to character. I guess what you were trying to was conversion to and from ascii:

number = getascii("a") or getascii('a')
character = char(asciicode)

Often the key code is the same as ascii though (for a-z).
Also note that getascii() was bugged on serverside until a few days ago, I am not sure if the new npcserver has been uploaded to all machines yet.
keyname(0..10) is for knowing the name of the default game keys and works on clientside only.
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 02:14 AM.


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