URL:
  <http://gna.org/bugs/?14221>

                 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
<http://svn.gna.org/viewcvs/freeciv?rev=10901&view=rev>. 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:

  <http://gna.org/bugs/?14221>

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


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

Reply via email to