I have if(js.global.console) lookup = console.getkeys("HSOQ", lastuser); where lastuser=system.lastuser... if entering a number it throws a !Javascript TypeError:
I have if(js.global.console) lookup = console.getkeys("HSOQ", lastuser);
where lastuser=system.lastuser... if entering a number it throws a !Javascript TypeError:
What is the correct usage of console.getkeys? I inferred:
console methods
getkeys:
number console.getkeys(string keys [,maxnum]) 3.10 get one key from m of
a list of valid command keys, or a number between 1 and maxnum
Re: console.getkeys
By: Mortifis to All on Wed Jul 24 2019 16:39:55
I have if(js.global.console) lookup = console.getkeys("HSOQ", lastuser); where lastuser=system.lastuser... if entering a number it throws a !Javascript TypeError:
That looks like it should work. What's the full text of the error?
Re: console.getkeys
By: Mortifis to All on Wed Jul 24 2019 16:39:55
I have if(js.global.console) lookup = console.getkeys("HSOQ", lastuser); where lastuser=system.lastuser... if entering a number it throws a !Javascript TypeError:
That looks like it should work. What's the full text of the error?
!JavaScript C:\sbbs\exec\dup_user_check.js line 277: TypeError: lookup.toUpperC
ase is not a function
I suspect that the toUpperCase() is not be supported by the console.getkeys() function :-/
Re: console.getkeys
By: Mortifis to All on Wed Jul 24 2019 16:39:55
I have if(js.global.console) lookup = console.getkeys("HSOQ", lastuser); where lastuser=system.lastuser... if entering a number it throws a !Javascript TypeError:
Re: console.getkeys
By: Mortifis to All on Wed Jul 24 2019 16:39:55
I have if(js.global.console) lookup = console.getkeys("HSOQ", lastuser); where lastuser=system.lastuser... if entering a number it throws a !Javascript TypeError:
perhaps I should run a condition check similar to if(lookup == [whatever || ... keys are in getkeys)) before I lookup.toUpperCase ... though before it was lookup = readln() and there was no error
Sysop: | Ruben Figueroa |
---|---|
Location: | Mesquite, Tx |
Users: | 3 |
Nodes: | 4 (0 / 4) |
Uptime: | 254:41:23 |
Calls: | 79 |
Files: | 53 |
Messages: | 75,377 |