cronoxhere
Banned User
- Joined
- Jun 27, 2009
- Messages
- 291
- Reaction score
- 2
B
u
m
p
u
m
p
[18/06/2010 15:01:16] [Error - LuaScriptInterface::loadFile] data/movements/scripts/football.lua:20: 'end' expected (to close 'function' at line 1) near '<eof>'
[18/06/2010 15:01:16] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/football.lua)
[18/06/2010 15:01:16] data/movements/scripts/football.lua:20: 'end' expected (to close 'function' at line 1) near '<eof>'
[18/06/2010 15:01:16] [Error - LuaScriptInterface::loadFile] data/movements/scripts/football.lua:20: 'end' expected (to close 'function' at line 1) near '<eof>'
[18/06/2010 15:01:16] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/football.lua)
[18/06/2010 15:01:16] data/movements/scripts/football.lua:20: 'end' expected (to close 'function' at line 1) near '<eof>'
@Rilleman
what is your problem, mi problem is switch say all time football field in use please wait and no ar eplayers in fields o.o
I am using this in 0.3.6 with out any error...
Of course that i dont use the oficial sux elf distro uahsuhsah, i use a version fixed by alissow.
My server don't use data.lua, but I don't know, where i must put this function:
Code:dofile(getDataDir() .. "lib/football.lua")
-- 1 - exit pos , 2 - team 1 ball, 3 - team 2 ball, 4 - team1frompos, 5 -team2frompos, 6 - team1topos, 7 - team2topos, 8-team1gate aid, 9 - team2game aid, 10 - speed, 11 - match time, 12 - highest uid + 1, 13 - field size
football_positions_uids = {}
football_positions_uids[1] = {23301,23302,23303, {23304,23305,23306}, {23307,23308,23309}, {23310,23311,23312}, {23313,23314,23315}, 23311, 23312, 450, 3, 23315, {8,3}}
football_positions_uids[2] = {23320,23321,23322, {23323,23324}, {23325,23326}, {23327,23328}, {23329,23330}, 23321, 23322, 450, 3, 23330, {6,2}}
football_positions_uids[3] = {23340,23341,23342, {23343,23344}, {23345,23346}, {23347,23348}, {23349,23350}, 23341, 23342, 450, 3, 23350, {6,2}}
teleport_players_on_goal = true
function footballGoal(pos, ball, team1pos, team2pos, goalStorage, ballpos) -- add goal to team 1/2 score, show "GOAL", animations, teleport ball and players
setGlobalStorageValue(goalStorage, getGlobalStorageValue(goalStorage)+1)
if(teleport_players_on_goal) then
for i = 1 , #team1pos do
doTeleportThing(getGlobalStorageValue(team1pos[i]), getThingPos(team1pos[i]), TRUE)
end
for i = 1 , #team2pos do
doTeleportThing(getGlobalStorageValue(team2pos[i]), getThingPos(team2pos[i]), TRUE)
end
end
doSendMagicEffect(pos, CONST_ME_BATS)
doTeleportThing(ball.uid, ballpos, TRUE)
doSendMagicEffect(ballpos, CONST_ME_MAGIC_GREEN)
dofile(getDataDir() .. "lib/football.lua")
Hey Guys dont forget that if your server dont use archive data.lua all files in folder /lib need a number before the archive name or this archive not will be load like this:
102-football.lua
Rep if i help ;D