[Freeciv-Dev] [bug #14221] notify.all and notify.player don't work in lua scripts

2009-10-03 Thread pepeto

Update of bug #14221 (project freeciv):

  Status:None => Fixed  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #14221] notify.all and notify.player don't work in lua scripts

2009-10-01 Thread pepeto

Follow-up Comment #6, bug #14221 (project freeciv):

I thought it was ok, there should be so many scripts, and I presume, not a
lot of them really use the TUTORIAL event.  But as you requested, I made new
patch for S2_1.


(file #6854)
___

Additional Item Attachment:

File name: S2_1_api_notify.diff   Size:0 KB


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #14221] notify.all and notify.player don't work in lua scripts

2009-10-01 Thread Marko Lindqvist

Follow-up Comment #5, bug #14221 (project freeciv):

Event should not be renamed in S2_1 as that would break existing scripts.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #14221] notify.all and notify.player don't work in lua scripts

2009-10-01 Thread pepeto

Follow-up Comment #4, bug #14221 (project freeciv):

Moved event E_TUTORIAL to E_SCRIPT.


(file #6848, file #6849)
___

Additional Item Attachment:

File name: trunk_S2_2_script_event.diff   Size:11 KB
File name: S2_1_script_event.diff Size:16 KB


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #14221] notify.all and notify.player don't work in lua scripts

2009-09-28 Thread pepeto

Update of bug #14221 (project freeciv):

 Assigned to:None => pepeto 


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #14221] notify.all and notify.player don't work in lua scripts

2009-09-05 Thread Marko Lindqvist

Follow-up Comment #3, bug #14221 (project freeciv):

Will you make patches?

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #14221] notify.all and notify.player don't work in lua scripts

2009-09-02 Thread Marko Lindqvist

Update of bug #14221 (project freeciv):

 Planned Release:None => 2.1.10 

___

Follow-up Comment #2:

> But I have no idea which one could be appropriate.

In TRUNK, new event type E.SCRIPT should be added.

In S2_1 E.TUTORIAL is probably most sensible event type to use as it already
has a bit similar uses.


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #14221] notify.all and notify.player don't work in lua scripts

2009-08-31 Thread matz

Follow-up Comment #1, bug #14221 (project freeciv):

The Bugreport applies to 2.1 and trunk. In 2.1 no error message is generated
though.

Steps to reproduce the bug:
1. Add the following snippet to script.lua of a ruleset

function turn_started_callback(turn, year)
  notify.all("Hello World")
end

2. start a game with that ruleset

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #14221] notify.all and notify.player don't work in lua scripts

2009-08-31 Thread matz

URL:
  

 Summary: notify.all and notify.player don't work in lua
scripts
 Project: Freeciv
Submitted by: matz
Submitted on: Monday 08/31/2009 at 19:12
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: None

___

Details:

calling notify.all or notify.player from a lua script results in an error:

lua error:
error in error handling


I think the problem lies in the following lines from
server/scripting/api.pkg:


function notify.all(...)
  notify.event_msg(nil, nil, E.NOEVENT, string.format(unpack(arg)))
end

function notify.player(player, ...)
  notify.event_msg(player, nil, E.NOEVENT, string.format(unpack(arg)))
end


As far as I can see E.NOEVENT has been removed in SVN revision #10901
. Replacing E.NOEVENT
by -1, 0 or one of the existing events like E.CHAT_MSG seems to work. But I
have no idea which one could be appropriate.




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev