Problem z napisami nad TP

Status
Zamknięty.

Nightek

Active User
Zarejestrowany
Dołączył
Wrzesień 20, 2008
Posty
58
Liczba reakcji
3
Witam mam problem z napisami nad TP. Wychodzi mi to:


[20/03/2010 19:11:24] [Error - GlobalEvent Interface]
[20/03/2010 19:11:25] buffer
[20/03/2010 19:11:25] Description:
[20/03/2010 19:11:25] [string "local text = {..."]:7: '}' expected (to close '{' at line 1) near '['
 
Odp: Problem z napisami nad TP

wklejisz mo?e sw?j skrypt?? Bo gdziesz masz nie domkni?te {
 
Odp: Problem z napisami nad TP

Witaj, prosz? spr?buj tego skryptu,
PHP:
local text = 
{
	[1] = {pos = {1095, 1217, 7}, text = {"text 1"}},
	[2] = {pos = {1096, 1217, 7}, text = {"text 2"}},
	[3] = {pos = {1097, 1217, 7}, text = {"text 3"}},
	[4] = {pos = {1098, 1217, 7}, text = {"text 4"}}
}

local effects = 
{
    [1] = {pos = {1095, 1217, 7}, effect = {18}},
    [2] = {pos = {1096, 1217, 7}, effect = {19}},
    [3] = {pos = {1097, 1217, 7}, effect = {21}},
    [4] = {pos = {1098, 1217, 7}, effect = {22}}
}

function onThink(interval, lastExecution)
    for _, area in pairs(text) do
		return doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
    end
    for _, area in pairs(effects) do
        doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
    end
    return true
end

A je?li nie chcesz to poka? sw?j,
Pozdrawiam.
 
Odp: Problem z napisami nad TP

Jak co? spr?buj tak:
function onThink(interval, lastExecution)
local pos = {x=165, y=55, z=7, stackpos=1}
doSendMagicEffect(pos, 35)
doSendAnimatedText(pos, "Tekst!", 400)
return TRUE
end
<globalevent name="magiceffectst" interval="1" event="script" value="magiceffects.lua"/>
:)
 
Odp: Problem z napisami nad TP

Tutaj wklejam wam m?j skrypt. I nie wiem co tu nie jest domkni?te

local pozycje = {
{pos = {x=1004, y=997, z=7}, tekst = "Depot"},
{pos = {x=996, y=1003, z=7}, tekst = "Trainers"},
{pos = {x=1006, y=1000, z=7}, tekst = "Quests"},
{pos = {x=996, y=997, z=7}, tekst = "NPCs"},
{pos = {x=994, y=1000, z=7}, tekst = "Teleports"},
{pos = {x=1004, y=1003, z=7}, tekst = "Enchant"},
}
local kolor = TEXTCOLOR_RED
local efekt = {odEfektu = 1, doEfektu=5}
function onThink(interval, lastExecution)
for i=1, #pozycje do
local efektLosowy = math.random(efekt.odEfektu,efekt.doEfektu)
doSendMagicEffect(pozycje.pos,efektLosowy)
doSendAnimatedText(pozycje.pos,pozycje.tekst,kolor)
end
return TRUE
end
 
Odp: Problem z napisami nad TP

@Up wszystko jest dobrze :/
mozesz z tej liniki usun?? ostatni przecinek

Kod:
{pos = {x=1004, y=1003, z=7}, tekst = "Enchant"}[COLOR="Red"],[/COLOR]
lecz w?tpi?, ?e to co? da :/
 
Odp: Problem z napisami nad TP

Mam ten skrypt od Maniucza i mam taki b??d w konsoli:
[21/03/2010 21:48:51] >> Loading script systems
[21/03/2010 21:48:52] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/magiceffect.lua:1: unexpected symbol near '{'
[21/03/2010 21:48:52] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/magiceffect.lua)
[21/03/2010 21:48:52] data/globalevents/scripts/magiceffect.lua:1: unexpected symbol near '{'
Pomo?esz ??
 
Odp: Problem z napisami nad TP

up a wklei?e? to ?

do globalevents.xml
Kod:
<globalevent name="magiceffectst" interval="1" event="script" value="magiceffects.lua"/>
 
Odp: Problem z napisami nad TP

Mam ten skrypt od Maniucza i mam taki b??d w konsoli:
[21/03/2010 21:48:51] >> Loading script systems
[21/03/2010 21:48:52] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/magiceffect.lua:1: unexpected symbol near '{'
[21/03/2010 21:48:52] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/magiceffect.lua)
[21/03/2010 21:48:52] data/globalevents/scripts/magiceffect.lua:1: unexpected symbol near '{'
Pomo?esz ??
Wklej skrypt to ci spr?buj? pom?c. Ale my?l? ?e w magiceffect.lua masz ko?o '{' jaki? znak kt?ry musisz usun??. Najlepiej wklej sw?j skrypt i to co pisze w magiceffect.lua

@EDIT

@Up wszystko jest dobrze :/
mozesz z tej liniki usun?? ostatni przecinek
Kod:
{pos = {x=1004, y=1003, z=7}, tekst = "Enchant"}[COLOR="Red"],[/COLOR]
lecz w?tpi?, ?e to co? da :/
wychodzi mi to :
[22/03/2010 21:25:44] [Error - LuaScriptInterface::loadFile] data/globalevents/scripts/napisy.lua:3: '}' expected (to close '{' at line 1) near '{'
[22/03/2010 21:25:44] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/napisy.lua)
[22/03/2010 21:25:44] data/globalevents/scripts/napisy.lua:3: '}' expected (to close '{' at line 1) near '{'
 
Ostatnia edycja:
Status
Zamknięty.
Back
Do góry