Clary
New Member
- Joined
- Mar 7, 2008
- Messages
- 1,007
- Reaction score
- 1
Well as some of u here know that i am trying to learn Lua
while trying to create my first move script i got this error can anyone help?
and i get this error
and lua function i am using:
Global.lua
my second script in talk:
well i get no error but it will only remove the item and it wont add player health any ideas?
while trying to create my first move script i got this error can anyone help?
PHP:
function onStepIn(cid, item, pos)
if item.actionid == 2579 then
if isPlayer(cid) ~= TRUE then
doConvinceSummon(cid, Training Monk, 0, summonplayerpos)
summonplayerpos = {x=1008, y=1042, z=7, stackpos=253}
summonplayer = getThingfromPos(summonplayerpos)
end
return 0
end
return 1
Code:
[26/05/2008 12:51:56] Warning: [Event::loadScript] Can not load script. data/movements/scripts/not used/floor.lua
[26/05/2008 12:51:56] data/movements/scripts/not used/floor.lua:4: ')' expected near 'Monk'
and lua function i am using:
Global.lua
PHP:
function doConvinceSummon(cid, creature, amount, pos)
summonplayerpos = {x=pos.x, y=pos.y, z=pos.z, stackpos=253}
summonplayer = getThingfromPos(summonplayerpos)
if(summonplayer ~= nil and summonplayer.itemid > 0) then
doPlayerSendCancel(cid,"There is not enough room to summon here.")
ret = 0
else
convince = doSummonCreature(creature, pos)
doConvinceCreature(cid, convince)
ret = 1
end
return ret
end
my second script in talk:
PHP:
function onSay(cid, words, param)
doPlayerRemoveItem(cid, 5908, 1)
doCreatureAddHealth(cid, 20+ getCreatureMaxHealth(cid))
doCreatureAddMana(cid, 20+ getCreatureMaxMana(cid))
return 0
end
return 1
Last edited: