Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Feature request
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #16  
Old 04-11-2013, 05:22 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Tim_Rocks View Post
Why not define your own echo function
echo is short and convenient, and doesn't require a DB-NPC or joining a class to use it.
__________________
Quote:
Reply With Quote
  #17  
Old 04-11-2013, 06:06 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Quote:
Originally Posted by fowlplay4 View Post
echo is short and convenient, and doesn't require a DB-NPC or joining a class to use it.
I agree. Its the most useful debug function.
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #18  
Old 04-11-2013, 08:33 PM
moondeath moondeath is offline
-
moondeath's Avatar
Join Date: Nov 2007
Location: Inside my mind.
Posts: 19
moondeath is on a distinguished road
Quote:
Originally Posted by Tim_Rocks View Post
As Blue said, we'd only be using it if we actually needed it. Could be enabled/disabled through serverops.

Why not something like this?

PHP Code:
function decho(temp.datatemp.npctemp.loc) {
  echo(
params);

Like Chris Vimes, you enjoy making things harder don't you?
__________________
AIM: DarkFireXZ3
Email: [email protected]

Gscript, Playerworld Rules, Support Center
Reply With Quote
  #19  
Old 04-12-2013, 02:59 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by BlueMelon View Post
This would not be to use 24/7 for every echo, it would be purely for debugging.
Lets say someone is echo'ing a boolean from a random test script in a random level then that staff member forgets it and decides to go on vacation for a week. That leaves us with one annoying echo we cannot find.
PHP Code:
function NewEcho() {
  echo();
  
log();

And just logging the level the npc is in and the message it sends? You could even do npc id's or just about any other way.. you at least narrow it down to the level this way. And you don't have to wait for the Graal Engine to be updated just to save a few lines of script?

The 1 thing I notice is using something similar you could also alternatively pass a string to NewEcho() that would let you make it not log so that you don't eat up the disk space.. Which might be pretty cool. Because if there was an edit to make it optional it would probably be best to allow such flexibility rather then log everything.

Sorry if I am just horrible misunderstanding the problem I never had this that issue yet, knock on wood.
Reply With Quote
  #20  
Old 04-12-2013, 07:14 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
It'd be impossible to enforce usage of such a function. Point is: some scripter has debug output anywhere using echo(), nobody knows where, it constantly echoes to RC.
__________________
Reply With Quote
  #21  
Old 04-12-2013, 01:15 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Quote:
Originally Posted by scriptless View Post
PHP Code:
function NewEcho() {
  echo();
  
log();

And just logging the level the npc is in and the message it sends? You could even do npc id's or just about any other way.. you at least narrow it down to the level this way. And you don't have to wait for the Graal Engine to be updated just to save a few lines of script?

The 1 thing I notice is using something similar you could also alternatively pass a string to NewEcho() that would let you make it not log so that you don't eat up the disk space.. Which might be pretty cool. Because if there was an edit to make it optional it would probably be best to allow such flexibility rather then log everything.

Sorry if I am just horrible misunderstanding the problem I never had this that issue yet, knock on wood.
Where do you expect to put that new function? It might be alright as a wrapper function in some projects, but in general debug its not exactly needed. I like fast debugging, 'echo' is fast to type and just easy. When you need to join a class or call the function from a DBNPC like Functions.echo() it starts getting long to type... if you're echo'ing alot.

But really, echo's shouldn't be logged all the time...
Maybe more features can be added to onAllRCChat() like getting the sender (RC, Weapon script,level,npc) and message type (echo,sendtorc,sendtonc,normal chat, etc.)
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #22  
Old 04-15-2013, 11:14 PM
mewtoo18 mewtoo18 is offline
Registered User
Join Date: Sep 2003
Location: Southbend IN
Posts: 41
mewtoo18 is on a distinguished road
Quote:
Originally Posted by BlueMelon View Post
Where do you expect to put that new function? It might be alright as a wrapper function in some projects, but in general debug its not exactly needed. I like fast debugging, 'echo' is fast to type and just easy. When you need to join a class or call the function from a DBNPC like Functions.echo() it starts getting long to type... if you're echo'ing alot.

But really, echo's shouldn't be logged all the time...
Maybe more features can be added to onAllRCChat() like getting the sender (RC, Weapon script,level,npc) and message type (echo,sendtorc,sendtonc,normal chat, etc.)
Well, I guess I was a little confused how it would work. How you would log some, but not all? I just assumed you would need a true/false flag to tell it to log or not. And yes I was refering to similar to a wraper. just join to a class.

Didn't stefan said join() in GS3 will work similar to PHP include()?

And Im not sure if it's a good idea to include a class just for that. Maybe it could be added to a class with other useful custom functions. And yeah echo() is easy to type. I only said NewFunction() but we all know you can make it how ever you want... eecho(), echo2(), ect.. and its not much harder to type.

but yes it would be pretty hard to enforce. and that would be the only downsite to my suggestion =/ hmm would be neat if we could make it echo("", true/false) maybe?

-scriptless
Reply With Quote
  #23  
Old 04-16-2013, 01:46 AM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
That's really aside from the point that echo() should be added to scriptlogfunctions for debug use and debug use only. If you want to make a custom echo on your server, go ahead, but on already established servers with over 200 echo calls in scripts, I'm not going in to find which one is echoing a true/false.
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #24  
Old 04-16-2013, 02:49 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by BlueMelon View Post
That's really aside from the point that echo() should be added to scriptlogfunctions for debug use and debug use only. If you want to make a custom echo on your server, go ahead, but on already established servers with over 200 echo calls in scripts, I'm not going in to find which one is echoing a true/false.
Well that still doesn't explain how it only logs "the problem" ones, and not "everyone". You can speak to me on a very technical level you know. I am not stupid. I just cannot comprehend how the log part would determin the difference between

PHP Code:
echo("hello"); 
and

PHP Code:
echo("world"); 
And it would be pretty cool to understand how that would work, since im not entirely familiar with "scriptlogfunctions".
Reply With Quote
  #25  
Old 04-16-2013, 03:28 AM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
scriptlogfunctions is a server option where you can add certain functions to it and it will log them to scriptfunctionslog.txt in the logs folder.

For example:
scriptlogfunctions=write player.gralats

Everytime that player variable is written to, it gets logged to the file. Ideally, you would not want this to be running 24/7, its a debug option.

If you say /listscriptlogfunctions on RC you will see
Quote:
Script functions that can be logged:
write player.nick, write player.guild, write player.kills, write player.onlinetime, write player.deaths, write player.rating, write player.ratingd, write player.gralats, call level.putnpc2, call player.setlevel2, call npc.warpto, call player.addweapon, call player.removeweapon, call npc.toweapons, call sendtonc, call sendtorc, call player.sendpm, call copylevel, call deletelevel, call npc.sendtext, call npc.requesttext, call deletefile
These are all the functions you can log/debug yourself if you add them to the serveroptions. Now what I'm requesting for in this thread is for the echo() function to be added to that list. I hope you understand now, because you're kinda making a fool of yourself by insisting us to create another function, thats really aside from the request.
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #26  
Old 04-16-2013, 03:34 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Ohh, so it doesn't log untill you change sctiptlogfunctions, then you remove when it's done? Now that, I can completely understand. Yes I could see how that would be better. Would rep+ when I get chance.

Last edited by scriptless; 04-17-2013 at 03:16 AM..
Reply With Quote
  #27  
Old 04-16-2013, 03:37 AM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Quote:
Originally Posted by scriptless View Post
Ohh, so it doesn't log untill you change sctiprlogfunctions, then you remove when it's done? Now that, I can completely understand. Yes I could see how that would be better.
This is from the log itself (accounts censored):

Time: Thu Apr 11 21:46:23 2013
write player.gralats by npcs[7] (in level era_shop-03_backnew.nw at pos (31, 30)) for <cname> (<account>): 224 -> 240

Time: Thu Apr 11 21:52:38 2013
write player.gralats by -System/ATM (in level era_shop-03_new.nw at pos (0, 0)) for <cname> (<account>): 513 -> 0

As you can see, it tells you the location of the call/write as-well as extra details.
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #28  
Old 05-17-2013, 12:25 AM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
bump
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #29  
Old 05-24-2013, 01:33 AM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
bump
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #30  
Old 05-27-2013, 08:43 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
bump
__________________
http://i.imgur.com/OOJbW.jpg
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 10:57 PM.


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