Obsdark
Member
- Joined
- Sep 25, 2011
- Messages
- 213
- Reaction score
- 9
¡¡¡Hey oh!!!
I have a problem, you see, i have this code:
The problem is specificaly this line of the code (14)
Like you can see, i'm definin 'tid' like a local thing, but for some reason this error shows up in the console:

Tnx you very much for your help and attention to my problem.
¡Have a Good Day and Several Bless!
(Y)(Y)
-Obsdark-
I have a problem, you see, i have this code:
LUA:
local tid = {
[5011] = {{x = 3021, y = 3085, z = 8}, {x = 3017, y = 3085, z = 8}, {x = 3029, y = 3076, z = 8}, {x = 3030, y = 3076, z = 8}, 25, 5}
}
--- item.actionid :=: Posicion(from), Posicion(to), Posicion(Pago Peaje), posicion (Lector) id's_castillo, Cobros(Peaje), Comision(Castillo). ---
local CastilloWare = {[2674] = {x = 3105, y = 3101, z = 8},
}
--- [2674] (Manzana (es), Reemplazar cuando los items esten hechos) ;) ---
--- item.itemid (Castillo id's) :=: Coords de paga Castillo ---
local Plyrps = tid[item.actionid]
local CastilloWare = CW[item.itemid]
Money = getPlayerMoney(cid)
Players = getPlayerPosition(cid)
vis = getTileItemById(Plyrps[4], CW)
--- doRemoveItem(getTileItemById(2148, Plyrps[3])).uid, Plyrps[6])
--- doRemoveItem((getTileItemById(2148, Plyrps[3]))uid, Plyrps[6])
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 and item.actionid == Plyrps and Players == Plyrps[1] and Money >= Plyrps[5] then
doPlayerRemoveMoney(cid, Plyrps[5])
doTransformItem(item.uid, item.itemid + 1)
doTeleportPlayer(cid, Plyrps[2])
doCreateItem(2148,(Plyrps[5] - Plyrps[6]), Plyrps[3])
doCreateItem(2148,Plyrps[6], CW[1])
elseif item.itemid == 1945 and item.actionid == Plyrps and Players == Plyrps[1] and vis and Money >= Plyrps[5] then
doPlayerRemoveMoney(cid, Plyrps[5])
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, Plyrps[2])
doCreateItem(2148,Plyrps[5], Plyrps[3])
elseif item.itemid == 1945 and item.actionid == Plyrps and Players == Plyrps[2] and Money >= Plyrps[5] then
doPlayerRemoveMoney(cid, Plyrps[5])
doTransformItem(item.uid, item.itemid + 1)
doTeleportPlayer(cid, Plyrps[1])
doCreateItem(2148,(Plyrps[5] - Plyrps[6]), Plyrps[3])
doCreateItem(2148,Plyrps[6], CW[1])
elseif item.itemid == 1945 and item.actionid == Plyrps and Players == Plyrps[2] and CW == Plyrps[4] and Money >= Plyrps[5] then
doPlayerRemoveMoney(cid, Plyrps[5])
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, Plyrps[1])
doCreateItem(2148,Plyrps[5], Plyrps[3])
elseif item.itemid == 1946 and item.uid == Plyrps then
doTransformItem(item.uid, item.itemid - 1)
else
doPlayerSendCancel(cid,"No tienes suficiente dinero")
end
return 1
end
The problem is specificaly this line of the code (14)
LUA:
local tid = {
[5011] = {{x = 3021, y = 3085, z = 8}, {x = 3017, y = 3085, z = 8}, {x = 3029, y = 3076, z = 8}, {x = 3030, y = 3076, z = 8}, 25, 5}
}
(...)
local Plyrps = tid[item.actionid]
(...)

Tnx you very much for your help and attention to my problem.
¡Have a Good Day and Several Bless!
(Y)(Y)
-Obsdark-