Evil Mark
Active Member
- Joined
- Nov 23, 2008
- Messages
- 1,707
- Reaction score
- 32
Hiya, today I created my first script, and it had a bugg.. Was working on the bug for 2 hours but still something wrong, here's the error
And here's the script:
Code:
[20/09/2009 13:39:49] Warning: [Event::checkScript] Can not load script. /scripts/deathbroadcast.lua
[20/09/2009 13:39:49] data/creaturescripts/scripts/deathbroadcast.lua:8: '=' expected near 'slayed'
[20/09/2009 13:39:49] Reloaded creature events.
And here's the script:
Code:
[COLOR="blue"]function[/COLOR] onDeath(cid, corpse, killer)
[COLOR="Blue"]local[/COLOR] playername = getPlayerName(cid)
[COLOR="blue"]local[/COLOR] killer = getCreatureTarget(cid)
[COLOR="blue"]local[/COLOR] level = getPlayerLevel(cid)
[COLOR="blue"]local[/COLOR] killerlevel = getPlayerLevel(cid)
[COLOR="Blue"]if[/COLOR] getPlayerLevel(cid) >= [COLOR="DarkOrange"]250[/COLOR] [COLOR="blue"]then[/COLOR]
broadcastMessage("..playername..") got slayed at level ("..level..") by ("..killer..") who/s level were ("..killerlevel..")
[COLOR="blue"]end[/COLOR]
[COLOR="blue"]return TRUE[/COLOR]
[COLOR="blue"]end[/COLOR]