Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro-core
Commits
42aa4345
Commit
42aa4345
authored
Jan 13, 2022
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update luaL_error()
https://www.lua.org/manual/5.4/manual.html
parent
4a39b0ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
36 deletions
+36
-36
libduel.cpp
libduel.cpp
+20
-20
libeffect.cpp
libeffect.cpp
+1
-1
libgroup.cpp
libgroup.cpp
+8
-8
scriptlib.cpp
scriptlib.cpp
+7
-7
No files found.
libduel.cpp
View file @
42aa4345
...
...
@@ -190,7 +190,7 @@ int32 scriptlib::duel_destroy(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
reason
=
(
uint32
)
lua_tointeger
(
L
,
2
);
uint32
dest
=
LOCATION_GRAVE
;
if
(
lua_gettop
(
L
)
>=
3
)
...
...
@@ -218,7 +218,7 @@ int32 scriptlib::duel_remove(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
pos
=
(
uint32
)
lua_tointeger
(
L
,
2
);
uint32
reason
=
(
uint32
)
lua_tointeger
(
L
,
3
);
if
(
pcard
)
...
...
@@ -244,7 +244,7 @@ int32 scriptlib::duel_sendto_grave(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
reason
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(
pcard
)
pduel
->
game_field
->
send_to
(
pcard
,
pduel
->
game_field
->
core
.
reason_effect
,
reason
,
pduel
->
game_field
->
core
.
reason_player
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
POS_FACEUP
);
...
...
@@ -494,7 +494,7 @@ int32 scriptlib::duel_sets(lua_State *L) {
}
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
pduel
->
game_field
->
add_process
(
PROCESSOR_SSET_G
,
0
,
pduel
->
game_field
->
core
.
reason_effect
,
pgroup
,
playerid
,
toplayer
,
confirm
);
return
lua_yieldk
(
L
,
0
,
(
lua_KContext
)
pduel
,
[](
lua_State
*
L
,
int32
status
,
lua_KContext
ctx
)
{
duel
*
pduel
=
(
duel
*
)
ctx
;
...
...
@@ -532,7 +532,7 @@ int32 scriptlib::duel_special_summon(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
sumtype
=
(
uint32
)
lua_tointeger
(
L
,
2
);
uint32
sumplayer
=
(
uint32
)
lua_tointeger
(
L
,
3
);
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
4
);
...
...
@@ -599,7 +599,7 @@ int32 scriptlib::duel_sendto_hand(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(
lua_isnil
(
L
,
2
)
||
(
playerid
!=
0
&&
playerid
!=
1
))
playerid
=
PLAYER_NONE
;
...
...
@@ -627,7 +627,7 @@ int32 scriptlib::duel_sendto_deck(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(
lua_isnil
(
L
,
2
)
||
(
playerid
!=
0
&&
playerid
!=
1
))
playerid
=
PLAYER_NONE
;
...
...
@@ -656,7 +656,7 @@ int32 scriptlib::duel_sendto_extra(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(
lua_isnil
(
L
,
2
)
||
(
playerid
!=
0
&&
playerid
!=
1
))
playerid
=
PLAYER_NONE
;
...
...
@@ -755,7 +755,7 @@ int32 scriptlib::duel_change_form(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
au
=
(
uint32
)
lua_tointeger
(
L
,
2
);
uint32
ad
=
au
,
du
=
au
,
dd
=
au
,
flag
=
0
;
uint32
top
=
lua_gettop
(
L
);
...
...
@@ -788,7 +788,7 @@ int32 scriptlib::duel_release(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
reason
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(
pcard
)
pduel
->
game_field
->
release
(
pcard
,
pduel
->
game_field
->
core
.
reason_effect
,
reason
,
pduel
->
game_field
->
core
.
reason_player
);
...
...
@@ -1012,7 +1012,7 @@ int32 scriptlib::duel_confirm_cards(lua_State *L) {
return
0
;
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
pduel
->
write_buffer8
(
MSG_CONFIRM_CARDS
);
pduel
->
write_buffer8
(
playerid
);
if
(
pcard
)
{
...
...
@@ -1087,7 +1087,7 @@ int32 scriptlib::duel_raise_event(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
code
=
(
uint32
)
lua_tointeger
(
L
,
2
);
effect
*
peffect
=
0
;
if
(
!
lua_isnil
(
L
,
3
))
{
...
...
@@ -1369,7 +1369,7 @@ int32 scriptlib::duel_get_control(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
2
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
...
...
@@ -1409,7 +1409,7 @@ int32 scriptlib::duel_swap_control(lua_State *L) {
pgroup2
=
*
(
group
**
)
lua_touserdata
(
L
,
2
);
pduel
=
pgroup1
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint32
reset_phase
=
0
;
uint32
reset_count
=
0
;
if
(
lua_gettop
(
L
)
>
2
)
{
...
...
@@ -1803,7 +1803,7 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint8
sumplayer
;
if
(
pcard
)
{
sumplayer
=
pcard
->
summon_player
;
...
...
@@ -1906,7 +1906,7 @@ int32 scriptlib::duel_get_mzone_count(lua_State *L) {
}
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
,
TRUE
))
{
mgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
2
);
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
for
(
int32
p
=
0
;
p
<
2
;
p
++
)
{
uint32
digit
=
1
;
for
(
auto
&
pcard
:
pduel
->
game_field
->
player
[
p
].
list_mzone
)
{
...
...
@@ -1965,7 +1965,7 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
}
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
3
,
TRUE
))
{
mgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
3
);
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
3
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
3
);
for
(
int32
p
=
0
;
p
<
2
;
p
++
)
{
uint32
digit
=
1
;
for
(
auto
&
pcard
:
pduel
->
game_field
->
player
[
p
].
list_mzone
)
{
...
...
@@ -3156,7 +3156,7 @@ int32 scriptlib::duel_set_must_select_cards(lua_State *L) {
duel
*
pduel
=
pgroup
->
pduel
;
pduel
->
game_field
->
core
.
must_select_cards
.
assign
(
pgroup
->
container
.
begin
(),
pgroup
->
container
.
end
());
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
0
;
}
int32
scriptlib
::
duel_grab_must_select_cards
(
lua_State
*
L
)
{
...
...
@@ -3181,7 +3181,7 @@ int32 scriptlib::duel_set_target_card(lua_State *L) {
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
chain
*
ch
=
pduel
->
game_field
->
get_chain
(
0
);
if
(
!
ch
)
return
0
;
...
...
@@ -3403,7 +3403,7 @@ int32 scriptlib::duel_overlay(lua_State *L) {
}
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
,
TRUE
))
{
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
2
);
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
if
(
pcard
)
{
card
::
card_set
cset
;
cset
.
insert
(
pcard
);
...
...
libeffect.cpp
View file @
42aa4345
...
...
@@ -200,7 +200,7 @@ int32 scriptlib::effect_set_label_object(lua_State *L) {
group
*
p
=
*
(
group
**
)
lua_touserdata
(
L
,
2
);
peffect
->
label_object
=
p
->
ref_handle
;
}
else
luaL_error
(
L
,
"Parameter 2 should be
\"
Card
\"
or
\"
Effect
\"
or
\"
Group
\"
."
);
return
luaL_error
(
L
,
"Parameter 2 should be
\"
Card
\"
or
\"
Effect
\"
or
\"
Group
\"
."
);
return
0
;
}
int32
scriptlib
::
effect_set_category
(
lua_State
*
L
)
{
...
...
libgroup.cpp
View file @
42aa4345
...
...
@@ -731,9 +731,9 @@ int32 scriptlib::group_get_bin_class_count(lua_State *L) {
int32
scriptlib
::
group_meta_add
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
if
(
!
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
)
&&
!
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
,
TRUE
))
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
if
(
!
check_param
(
L
,
PARAM_TYPE_CARD
,
2
,
TRUE
)
&&
!
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
,
TRUE
))
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
group
*
pgroup
=
pduel
->
new_group
();
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
))
{
...
...
@@ -758,9 +758,9 @@ int32 scriptlib::group_meta_add(lua_State* L) {
int32
scriptlib
::
group_meta_sub
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
if
(
!
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
)
&&
!
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
,
TRUE
))
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
if
(
!
check_param
(
L
,
PARAM_TYPE_CARD
,
2
,
TRUE
)
&&
!
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
,
TRUE
))
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
group
*
pgroup
=
pduel
->
new_group
();
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
))
{
...
...
@@ -785,9 +785,9 @@ int32 scriptlib::group_meta_sub(lua_State* L) {
int32
scriptlib
::
group_meta_band
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
if
(
!
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
)
&&
!
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
,
TRUE
))
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
if
(
!
check_param
(
L
,
PARAM_TYPE_CARD
,
2
,
TRUE
)
&&
!
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
,
TRUE
))
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
group
*
pgroup
=
pduel
->
new_group
();
field
::
card_set
check_set
;
...
...
@@ -814,9 +814,9 @@ int32 scriptlib::group_meta_band(lua_State* L) {
int32
scriptlib
::
group_meta_bxor
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
if
(
!
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
)
&&
!
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
,
TRUE
))
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
if
(
!
check_param
(
L
,
PARAM_TYPE_CARD
,
2
,
TRUE
)
&&
!
check_param
(
L
,
PARAM_TYPE_GROUP
,
2
,
TRUE
))
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
2
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
group
*
pgroup
=
pduel
->
new_group
();
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
))
{
...
...
scriptlib.cpp
View file @
42aa4345
...
...
@@ -29,7 +29,7 @@ int32 scriptlib::check_param(lua_State* L, int32 param_type, int32 index, int32
return
TRUE
;
if
(
retfalse
)
return
FALSE
;
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
."
,
index
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
."
,
index
);
break
;
}
case
PARAM_TYPE_GROUP
:
{
...
...
@@ -37,7 +37,7 @@ int32 scriptlib::check_param(lua_State* L, int32 param_type, int32 index, int32
return
TRUE
;
if
(
retfalse
)
return
FALSE
;
luaL_error
(
L
,
"Parameter %d should be
\"
Group
\"
."
,
index
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Group
\"
."
,
index
);
break
;
}
case
PARAM_TYPE_EFFECT
:
{
...
...
@@ -45,7 +45,7 @@ int32 scriptlib::check_param(lua_State* L, int32 param_type, int32 index, int32
return
TRUE
;
if
(
retfalse
)
return
FALSE
;
luaL_error
(
L
,
"Parameter %d should be
\"
Effect
\"
."
,
index
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Effect
\"
."
,
index
);
break
;
}
case
PARAM_TYPE_FUNCTION
:
{
...
...
@@ -53,7 +53,7 @@ int32 scriptlib::check_param(lua_State* L, int32 param_type, int32 index, int32
return
TRUE
;
if
(
retfalse
)
return
FALSE
;
luaL_error
(
L
,
"Parameter %d should be
\"
Function
\"
."
,
index
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Function
\"
."
,
index
);
break
;
}
case
PARAM_TYPE_STRING
:
{
...
...
@@ -61,7 +61,7 @@ int32 scriptlib::check_param(lua_State* L, int32 param_type, int32 index, int32
return
TRUE
;
if
(
retfalse
)
return
FALSE
;
luaL_error
(
L
,
"Parameter %d should be
\"
String
\"
."
,
index
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
String
\"
."
,
index
);
break
;
}
}
...
...
@@ -70,12 +70,12 @@ int32 scriptlib::check_param(lua_State* L, int32 param_type, int32 index, int32
int32
scriptlib
::
check_param_count
(
lua_State
*
L
,
int32
count
)
{
if
(
lua_gettop
(
L
)
<
count
)
luaL_error
(
L
,
"%d Parameters are needed."
,
count
);
return
luaL_error
(
L
,
"%d Parameters are needed."
,
count
);
return
TRUE
;
}
int32
scriptlib
::
check_action_permission
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
if
(
pduel
->
lua
->
no_action
)
luaL_error
(
L
,
"Action is not allowed here."
);
return
luaL_error
(
L
,
"Action is not allowed here."
);
return
TRUE
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment