• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved <eof> problem

maxymoonmax

New Member
Joined
Jun 30, 2015
Messages
2
Reaction score
0
Im think everyone know about this problem, im try to fix it but im really dont know how to do that :(
Im trying to make statue why change outfit for 1kk... Its normaly work before when it was for free...

When im put :
Code:
if doPlayerRemoveMoney(cid, price) then
and
Code:
else 
doPlayerSendTextMessage(cid, 20, 'You don\'t have '..price..' gold coinds required for the random outfit!')
im get next error...

Here is error:
Code:
[05/07/2015 01:41:38] [Error - LuaScriptInterface::loadFile] data/actions/scripts/outfiter.lua:19: '<eof>' expected near 'end'
[05/07/2015 01:41:38] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/outfiter.lua)
[05/07/2015 01:41:38] data/actions/scripts/outfiter.lua:19: '<eof>' expected near 'end'

Here is full scrypt:

Code:
local price = 1000000

function onUse(cid, item, fromPosition, itemEx, toPosition)
local v, tmp = math.random(351), getCreatureOutfit(cid)
end
while isInArray({tmp.lookType, 75, 135, 266, 302, 273, 149, 268, 269, 270, 278, 279, 288, 289, 324, 325, 326, 327, 328, 329, 335, 336, 251, 252}, v) == TRUE or v <= 1 or (v > 128 and v < 192) or v > 351 do
v = math.random(351)
end

tmp.lookType = v
if doPlayerRemoveMoney(cid, price) then
doCreatureChangeOutfit(cid, tmp)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
doCreatureSay(cid, 'Your outfit has been changed.', TALKTYPE_ORANGE_1, false, cid, getThingPos(cid))
else
doPlayerSendTextMessage(cid, 20, 'You don\'t have '..price..' gold coinds required for the random outfit!')
doSendMagicEffect(getThingPos(cid),12)
end
return TRUE
end

Sorry for my bad english ;)
 
Im think everyone know about this problem, im try to fix it but im really dont know how to do that :(
Im trying to make statue why change outfit for 1kk... Its normaly work before when it was for free...

When im put :
Code:
if doPlayerRemoveMoney(cid, price) then
and
Code:
else
doPlayerSendTextMessage(cid, 20, 'You don\'t have '..price..' gold coinds required for the random outfit!')
im get next error...

Here is error:
Code:
[05/07/2015 01:41:38] [Error - LuaScriptInterface::loadFile] data/actions/scripts/outfiter.lua:19: '<eof>' expected near 'end'
[05/07/2015 01:41:38] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/outfiter.lua)
[05/07/2015 01:41:38] data/actions/scripts/outfiter.lua:19: '<eof>' expected near 'end'

Here is full scrypt:

Code:
local price = 1000000

function onUse(cid, item, fromPosition, itemEx, toPosition)
local v, tmp = math.random(351), getCreatureOutfit(cid)
end
while isInArray({tmp.lookType, 75, 135, 266, 302, 273, 149, 268, 269, 270, 278, 279, 288, 289, 324, 325, 326, 327, 328, 329, 335, 336, 251, 252}, v) == TRUE or v <= 1 or (v > 128 and v < 192) or v > 351 do
v = math.random(351)
end

tmp.lookType = v
if doPlayerRemoveMoney(cid, price) then
doCreatureChangeOutfit(cid, tmp)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
doCreatureSay(cid, 'Your outfit has been changed.', TALKTYPE_ORANGE_1, false, cid, getThingPos(cid))
else
doPlayerSendTextMessage(cid, 20, 'You don\'t have '..price..' gold coinds required for the random outfit!')
doSendMagicEffect(getThingPos(cid),12)
end
return TRUE
end

Sorry for my bad english ;)
Code:
local price = 1000000

function onUse(cid, item, fromPosition, itemEx, toPosition)
local v, tmp = math.random(351), getCreatureOutfit(cid)
while isInArray({tmp.lookType, 75, 135, 266, 302, 273, 149, 268, 269, 270, 278, 279, 288, 289, 324, 325, 326, 327, 328, 329, 335, 336, 251, 252}, v) == TRUE or v <= 1 or (v > 128 and v < 192) or v > 351 do
v = math.random(351)
end

tmp.lookType = v
if doPlayerRemoveMoney(cid, price) then
doCreatureChangeOutfit(cid, tmp)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
doCreatureSay(cid, 'Your outfit has been changed.', TALKTYPE_ORANGE_1, false, cid, getThingPos(cid))
else
doPlayerSendTextMessage(cid, 20, 'You don\'t have '..price..' gold coinds required for the random outfit!')
doSendMagicEffect(getThingPos(cid),12)
end
return TRUE
end
 
Back
Top