forked from github/server
fix crash
This commit is contained in:
parent
bc3612935b
commit
2648690af9
2 changed files with 14 additions and 4 deletions
|
@ -90,9 +90,8 @@ msg_set_resource(lua_message * msg, const char * param, const char * resname)
|
|||
int
|
||||
msg_set_unit(lua_message * msg, const char * param, const unit * u)
|
||||
{
|
||||
int i = mtype_get_param(msg->mtype, param);
|
||||
|
||||
if (msg->mtype) {
|
||||
int i = mtype_get_param(msg->mtype, param);
|
||||
|
||||
if (i==msg->mtype->nparameters) {
|
||||
return E_INVALID_PARAMETER_NAME;
|
||||
|
@ -111,8 +110,8 @@ msg_set_unit(lua_message * msg, const char * param, const unit * u)
|
|||
int
|
||||
msg_set_region(lua_message * msg, const char * param, const region * r)
|
||||
{
|
||||
int i = mtype_get_param(msg->mtype, param);
|
||||
if (msg->mtype) {
|
||||
int i = mtype_get_param(msg->mtype, param);
|
||||
|
||||
if (i==msg->mtype->nparameters) {
|
||||
return E_INVALID_PARAMETER_NAME;
|
||||
|
@ -131,9 +130,10 @@ msg_set_region(lua_message * msg, const char * param, const region * r)
|
|||
int
|
||||
msg_set_string(lua_message * msg, const char * param, const char * value)
|
||||
{
|
||||
int i = mtype_get_param(msg->mtype, param);
|
||||
if (msg->mtype) {
|
||||
int i = mtype_get_param(msg->mtype, param);
|
||||
variant var;
|
||||
|
||||
if (i==msg->mtype->nparameters) {
|
||||
return E_INVALID_PARAMETER_NAME;
|
||||
}
|
||||
|
|
10
src/res/e3a/messages.xml
Normal file
10
src/res/e3a/messages.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<messages>
|
||||
<message name="raindance_effect" section="magic">
|
||||
<type>
|
||||
<arg name="mage" type="unit"/>
|
||||
</type>
|
||||
<text locale="de">"$if($isnull($mage),"Ein unentdeckter Magier",$unit($mage)) führt einen sonderbaren Tanz auf. Kurz darauf beginnt es zu regnen."</text>
|
||||
<text locale="en">"$if($isnull($mage),"an unseen magician",$unit($mage)) dances a strange dance. Shortly after, rain begins to fall on the fields."</text>
|
||||
</message>
|
||||
</messages>
|
Loading…
Reference in a new issue