• 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!

Console log, tfs 0.4

Scal

RuneScape OT
Joined
Aug 3, 2014
Messages
33
Reaction score
13
Hi guys,

Wondering if anyone will be able to help me, I have a place in my map which spawns around 100 npcs. (a part of a quest) I had to do a script which turns the NPC to face a specific direction. However, I am now receiving around 11 of these errors when I start up the console, Is there anyway I can easily find which code is wrong? I don't really fancy spending hours checking each spot.....

[19:4:17.946] [Error - GlobalEvent Interface]
[19:4:17.956] data/globalevents/scripts/npcpositioning.lua:onStartup
[19:4:17.970] Description:
[19:4:17.975] (LuaInterface::luaDoCreatureSetLookDir) Creature not found


thanks!
 
Hi guys,

Wondering if anyone will be able to help me, I have a place in my map which spawns around 100 npcs. (a part of a quest) I had to do a script which turns the NPC to face a specific direction. However, I am now receiving around 11 of these errors when I start up the console, Is there anyway I can easily find which code is wrong? I don't really fancy spending hours checking each spot.....

[19:4:17.946] [Error - GlobalEvent Interface]
[19:4:17.956] data/globalevents/scripts/npcpositioning.lua:eek:nStartup
[19:4:17.970] Description:
[19:4:17.975] (LuaInterface::luaDoCreatureSetLookDir) Creature not found


thanks!
Its impossible for someone to help you if you don't provide the script, remember this every time you need help with an error in a script, if you are requesting a script always provide the distro...

These are just 2 basic rules of support/request
 
Hi,

I'm not asking if anyone can fix the code on the script, I'm asking if there any easier way I could find what the issue relates too.. however this my script...


local npcPositions = {
{ position={x = 592, y = 796, z = 6}, direction=SOUTH },
{ position={x = 591, y = 796, z = 6}, direction=SOUTH },
{ position={x = 590, y = 796, z = 6}, direction=SOUTH },
{ position={x = 589, y = 796, z = 6}, direction=SOUTH },
{ position={x = 588, y = 796, z = 6}, direction=SOUTH },
{ position={x = 593, y = 796, z = 6}, direction=SOUTH },
{ position={x = 594, y = 796, z = 6}, direction=SOUTH },
{ position={x = 595, y = 796, z = 6}, direction=SOUTH },
{ position={x = 596, y = 796, z = 6}, direction=SOUTH },
{ position={x = 587, y = 796, z = 6}, direction=SOUTH },
{ position={x = 586, y = 796, z = 6}, direction=SOUTH },
{ position={x = 585, y = 796, z = 6}, direction=SOUTH },
{ position={x = 584, y = 796, z = 6}, direction=SOUTH },
{ position={x = 597, y = 796, z = 6}, direction=SOUTH },
{ position={x = 598, y = 796, z = 6}, direction=SOUTH },
{ position={x = 599, y = 796, z = 6}, direction=SOUTH },
{ position={x = 600, y = 796, z = 6}, direction=SOUTH },
{ position={x = 601, y = 796, z = 6}, direction=SOUTH },
{ position={x = 585, y = 795, z = 6}, direction=SOUTH },
{ position={x = 586, y = 795, z = 6}, direction=SOUTH },
{ position={x = 587, y = 795, z = 6}, direction=SOUTH },
{ position={x = 588, y = 795, z = 6}, direction=SOUTH },
{ position={x = 589, y = 795, z = 6}, direction=SOUTH },
{ position={x = 590, y = 795, z = 6}, direction=SOUTH },
{ position={x = 591, y = 795, z = 6}, direction=SOUTH },
{ position={x = 592, y = 795, z = 6}, direction=SOUTH },
{ position={x = 593, y = 795, z = 6}, direction=SOUTH },
{ position={x = 594, y = 795, z = 6}, direction=SOUTH },
{ position={x = 595, y = 795, z = 6}, direction=SOUTH },
{ position={x = 596, y = 795, z = 6}, direction=SOUTH },
{ position={x = 597, y = 795, z = 6}, direction=SOUTH },
{ position={x = 598, y = 795, z = 6}, direction=SOUTH },
{ position={x = 599, y = 795, z = 6}, direction=SOUTH },
{ position={x = 600, y = 795, z = 6}, direction=SOUTH },
{ position={x = 584, y = 797, z = 6}, direction=SOUTH },
{ position={x = 585, y = 797, z = 6}, direction=SOUTH },
{ position={x = 600, y = 797, z = 6}, direction=SOUTH },
{ position={x = 601, y = 797, z = 6}, direction=SOUTH },
{ position={x = 583, y = 792, z = 5}, direction=SOUTH },
{ position={x = 584, y = 792, z = 5}, direction=SOUTH },
{ position={x = 585, y = 792, z = 5}, direction=SOUTH },
{ position={x = 586, y = 792, z = 5}, direction=SOUTH },
{ position={x = 587, y = 792, z = 5}, direction=SOUTH },
{ position={x = 588, y = 792, z = 5}, direction=SOUTH },
{ position={x = 589, y = 792, z = 5}, direction=SOUTH },
{ position={x = 590, y = 792, z = 5}, direction=SOUTH },
{ position={x = 591, y = 792, z = 5}, direction=SOUTH },
{ position={x = 592, y = 792, z = 5}, direction=SOUTH },
{ position={x = 593, y = 792, z = 5}, direction=SOUTH },
{ position={x = 594, y = 792, z = 5}, direction=SOUTH },
{ position={x = 595, y = 792, z = 5}, direction=SOUTH },
{ position={x = 596, y = 792, z = 5}, direction=SOUTH },
{ position={x = 597, y = 792, z = 5}, direction=SOUTH },
{ position={x = 598, y = 792, z = 5}, direction=SOUTH },
{ position={x = 599, y = 792, z = 5}, direction=SOUTH },
{ position={x = 600, y = 792, z = 5}, direction=SOUTH },
{ position={x = 601, y = 792, z = 5}, direction=SOUTH },
{ position={x = 602, y = 792, z = 5}, direction=SOUTH },
{ position={x = 583, y = 793, z = 5}, direction=SOUTH },
{ position={x = 584, y = 793, z = 5}, direction=SOUTH },
{ position={x = 585, y = 793, z = 5}, direction=SOUTH },
{ position={x = 586, y = 793, z = 5}, direction=SOUTH },
{ position={x = 587, y = 793, z = 5}, direction=SOUTH },
{ position={x = 588, y = 793, z = 5}, direction=SOUTH },
{ position={x = 589, y = 793, z = 5}, direction=SOUTH },
{ position={x = 590, y = 793, z = 5}, direction=SOUTH },
{ position={x = 591, y = 793, z = 5}, direction=SOUTH },
{ position={x = 592, y = 793, z = 5}, direction=SOUTH },
{ position={x = 593, y = 793, z = 5}, direction=SOUTH },
{ position={x = 594, y = 793, z = 5}, direction=SOUTH },
{ position={x = 595, y = 793, z = 5}, direction=SOUTH },
{ position={x = 596, y = 793, z = 5}, direction=SOUTH },
{ position={x = 597, y = 793, z = 5}, direction=SOUTH },
{ position={x = 598, y = 793, z = 5}, direction=SOUTH },
{ position={x = 599, y = 793, z = 5}, direction=SOUTH },
{ position={x = 600, y = 793, z = 5}, direction=SOUTH },
{ position={x = 601, y = 793, z = 5}, direction=SOUTH },
{ position={x = 602, y = 793, z = 5}, direction=SOUTH },
{ position={x = 782, y = 603, z = 5}, direction=SOUTH },
{ position={x = 603, y = 793, z = 5}, direction=SOUTH },
{ position={x = 582, y = 794, z = 5}, direction=SOUTH },
{ position={x = 583, y = 794, z = 5}, direction=SOUTH },
{ position={x = 602, y = 794, z = 5}, direction=SOUTH },
{ position={x = 603, y = 794, z = 5}, direction=SOUTH },
{ position={x = 582, y = 795, z = 5}, direction=SOUTH },
{ position={x = 603, y = 795, z = 5}, direction=SOUTH },

{ position={x = 559, y = 799, z = 8}, direction=SOUTH },
{ position={x = 564, y = 799, z = 8}, direction=SOUTH },
{ position={x = 570, y = 799, z = 8}, direction=SOUTH },
{ position={x = 574, y = 799, z = 8}, direction=SOUTH },

{ position={x = 566, y = 804, z = 8}, direction=EAST },
{ position={x = 566, y = 809, z = 8}, direction=EAST },
{ position={x = 564, y = 805, z = 8}, direction=EAST },
{ position={x = 564, y = 810, z = 8}, direction=EAST },

{ position={x = 580, y = 808, z = 6}, direction=EAST },
{ position={x = 580, y = 807, z = 6}, direction=EAST },
{ position={x = 580, y = 806, z = 6}, direction=EAST },
{ position={x = 580, y = 805, z = 6}, direction=EAST },
{ position={x = 580, y = 804, z = 6}, direction=EAST },
{ position={x = 580, y = 803, z = 6}, direction=EAST },
{ position={x = 580, y = 802, z = 6}, direction=EAST },
{ position={x = 580, y = 801, z = 6}, direction=EAST },
{ position={x = 580, y = 800, z = 6}, direction=EAST },
{ position={x = 581, y = 808, z = 6}, direction=EAST },
{ position={x = 581, y = 807, z = 6}, direction=EAST },
{ position={x = 581, y = 806, z = 6}, direction=EAST },
{ position={x = 581, y = 805, z = 6}, direction=EAST },
{ position={x = 581, y = 804, z = 6}, direction=EAST },
{ position={x = 581, y = 803, z = 6}, direction=EAST },
{ position={x = 581, y = 802, z = 6}, direction=EAST },
{ position={x = 581, y = 801, z = 6}, direction=EAST },
{ position={x = 581, y = 800, z = 6}, direction=EAST },
{ position={x = 581, y = 809, z = 6}, direction=EAST },
{ position={x = 581, y = 879, z = 6}, direction=EAST },
{ position={x = 582, y = 798, z = 6}, direction=EAST },
{ position={x = 582, y = 799, z = 6}, direction=EAST },
{ position={x = 582, y = 800, z = 6}, direction=EAST },
{ position={x = 582, y = 809, z = 6}, direction=EAST },
{ position={x = 582, y = 808, z = 6}, direction=EAST },
{ position={x = 583, y = 810, z = 6}, direction=EAST },
{ position={x = 583, y = 798, z = 6}, direction=EAST },
{ position={x = 582, y = 810, z = 6}, direction=EAST },

{ position={x = 577, y = 798, z = 5}, direction=EAST },

{ position={x = 706, y = 802, z = 5}, direction=EAST },
{ position={x = 706, y = 803, z = 5}, direction=EAST },
{ position={x = 706, y = 804, z = 5}, direction=EAST },
{ position={x = 706, y = 807, z = 5}, direction=EAST },

{ position={x = 705, y = 806, z = 3}, direction=EAST },
{ position={x = 705, y = 807, z = 3}, direction=EAST },
{ position={x = 705, y = 808, z = 3}, direction=EAST },

{ position={x = 715, y = 806, z = 3}, direction=WEST },
{ position={x = 715, y = 807, z = 3}, direction=WEST },
{ position={x = 715, y = 808, z = 3}, direction=WEST },

{ position={x = 714, y = 802, z = 5}, direction=WEST },
{ position={x = 714, y = 803, z = 5}, direction=WEST },
{ position={x = 714, y = 804, z = 5}, direction=WEST },
{ position={x = 714, y = 807, z = 5}, direction=WEST },

{ position={x = 706, y = 800, z = 3}, direction=SOUTH },
{ position={x = 710, y = 800, z = 3}, direction=SOUTH },
{ position={x = 714, y = 800, z = 3}, direction=SOUTH },

{ position={x = 719, y = 810, z = 3}, direction=SOUTH },
{ position={x = 718, y = 810, z = 3}, direction=SOUTH },
{ position={x = 717, y = 810, z = 3}, direction=SOUTH },
{ position={x = 718, y = 811, z = 5}, direction=SOUTH },




{ position={x = 577, y = 799, z = 5}, direction=EAST },
{ position={x = 577, y = 800, z = 5}, direction=EAST },
{ position={x = 577, y = 801, z = 5}, direction=EAST },
{ position={x = 577, y = 802, z = 5}, direction=EAST },
{ position={x = 577, y = 803, z = 5}, direction=EAST },
{ position={x = 577, y = 804, z = 5}, direction=EAST },
{ position={x = 577, y = 805, z = 5}, direction=EAST },
{ position={x = 577, y = 806, z = 5}, direction=EAST },
{ position={x = 577, y = 807, z = 5}, direction=EAST },
{ position={x = 577, y = 809, z = 5}, direction=EAST },
{ position={x = 577, y = 810, z = 5}, direction=EAST },
{ position={x = 578, y = 798, z = 5}, direction=EAST },
{ position={x = 578, y = 799, z = 5}, direction=EAST },
{ position={x = 578, y = 800, z = 5}, direction=EAST },
{ position={x = 578, y = 801, z = 5}, direction=EAST },
{ position={x = 578, y = 802, z = 5}, direction=EAST },
{ position={x = 578, y = 803, z = 5}, direction=EAST },
{ position={x = 578, y = 804, z = 5}, direction=EAST },
{ position={x = 578, y = 805, z = 5}, direction=EAST },
{ position={x = 578, y = 806, z = 5}, direction=EAST },
{ position={x = 578, y = 807, z = 5}, direction=EAST },
{ position={x = 578, y = 809, z = 5}, direction=EAST },
{ position={x = 578, y = 810, z = 5}, direction=EAST },
{ position={x = 579, y = 797, z = 5}, direction=EAST },
{ position={x = 579, y = 798, z = 5}, direction=EAST },
{ position={x = 579, y = 810, z = 5}, direction=EAST },
{ position={x = 579, y = 811, z = 5}, direction=EAST },
{ position={x = 580, y = 811, z = 5}, direction=EAST },
{ position={x = 580, y = 812, z = 5}, direction=EAST },
{ position={x = 580, y = 797, z = 5}, direction=EAST },
{ position={x = 580, y = 796, z = 5}, direction=EAST },
{ position={x = 581, y = 796, z = 5}, direction=EAST },
{ position={x = 581, y = 811, z = 5}, direction=EAST },
{ position={x = 581, y = 799, z = 6}, direction=EAST },
{ position={x = 582, y = 803, z = 6}, direction=EAST },
{ position={x = 582, y = 804, z = 6}, direction=EAST },
{ position={x = 582, y = 805, z = 6}, direction=EAST },


{ position={x = 605, y = 800, z = 6}, direction=WEST },
{ position={x = 605, y = 801, z = 6}, direction=WEST },
{ position={x = 605, y = 802, z = 6}, direction=WEST },
{ position={x = 605, y = 803, z = 6}, direction=WEST },
{ position={x = 605, y = 804, z = 6}, direction=WEST },
{ position={x = 605, y = 805, z = 6}, direction=WEST },
{ position={x = 605, y = 806, z = 6}, direction=WEST },
{ position={x = 605, y = 807, z = 6}, direction=WEST },
{ position={x = 605, y = 808, z = 6}, direction=WEST },
{ position={x = 604, y = 800, z = 6}, direction=WEST },
{ position={x = 604, y = 801, z = 6}, direction=WEST },
{ position={x = 604, y = 802, z = 6}, direction=WEST },
{ position={x = 604, y = 803, z = 6}, direction=WEST },
{ position={x = 604, y = 804, z = 6}, direction=WEST },
{ position={x = 604, y = 805, z = 6}, direction=WEST },
{ position={x = 604, y = 806, z = 6}, direction=WEST },
{ position={x = 604, y = 807, z = 6}, direction=WEST },
{ position={x = 604, y = 799, z = 6}, direction=WEST },
{ position={x = 604, y = 809, z = 6}, direction=WEST },
{ position={x = 604, y = 808, z = 6}, direction=WEST },
{ position={x = 603, y = 798, z = 6}, direction=WEST },
{ position={x = 603, y = 799, z = 6}, direction=WEST },
{ position={x = 603, y = 800, z = 6}, direction=WEST },
{ position={x = 603, y = 808, z = 6}, direction=WEST },
{ position={x = 603, y = 809, z = 6}, direction=WEST },
{ position={x = 603, y = 810, z = 6}, direction=WEST },
{ position={x = 602, y = 798, z = 6}, direction=WEST },
{ position={x = 602, y = 810, z = 6}, direction=WEST },
{ position={x = 603, y = 803, z = 6}, direction=WEST },
{ position={x = 603, y = 804, z = 6}, direction=WEST },
{ position={x = 603, y = 805, z = 6}, direction=WEST },

{ position={x = 608, y = 798, z = 5}, direction=WEST },
{ position={x = 608, y = 799, z = 5}, direction=WEST },
{ position={x = 608, y = 800, z = 5}, direction=WEST },
{ position={x = 608, y = 801, z = 5}, direction=WEST },
{ position={x = 608, y = 802, z = 5}, direction=WEST },
{ position={x = 608, y = 803, z = 5}, direction=WEST },
{ position={x = 608, y = 804, z = 5}, direction=WEST },
{ position={x = 608, y = 805, z = 5}, direction=WEST },
{ position={x = 608, y = 806, z = 5}, direction=WEST },
{ position={x = 608, y = 807, z = 5}, direction=WEST },
{ position={x = 608, y = 808, z = 5}, direction=WEST },
{ position={x = 608, y = 809, z = 5}, direction=WEST },
{ position={x = 608, y = 810, z = 5}, direction=WEST },
{ position={x = 606, y = 804, z = 5}, direction=WEST },
{ position={x = 606, y = 803, z = 5}, direction=WEST },
{ position={x = 606, y = 805, z = 5}, direction=WEST },

{ position={x = 607, y = 798, z = 5}, direction=WEST },
{ position={x = 607, y = 799, z = 5}, direction=WEST },
{ position={x = 607, y = 800, z = 5}, direction=WEST },
{ position={x = 607, y = 801, z = 5}, direction=WEST },
{ position={x = 607, y = 802, z = 5}, direction=WEST },
{ position={x = 607, y = 803, z = 5}, direction=WEST },
{ position={x = 607, y = 804, z = 5}, direction=WEST },
{ position={x = 607, y = 805, z = 5}, direction=WEST },
{ position={x = 607, y = 806, z = 5}, direction=WEST },
{ position={x = 607, y = 807, z = 5}, direction=WEST },
{ position={x = 607, y = 808, z = 5}, direction=WEST },
{ position={x = 607, y = 809, z = 5}, direction=WEST },
{ position={x = 607, y = 810, z = 5}, direction=WEST },

{ position={x = 606, y = 810, z = 5}, direction=WEST },
{ position={x = 606, y = 811, z = 5}, direction=WEST },
{ position={x = 605, y = 811, z = 5}, direction=WEST },
{ position={x = 605, y = 812, z = 5}, direction=WEST },
{ position={x = 604, y = 812, z = 5}, direction=WEST },
{ position={x = 606, y = 798, z = 5}, direction=WEST },
{ position={x = 606, y = 797, z = 5}, direction=WEST },
{ position={x = 605, y = 797, z = 5}, direction=WEST },
{ position={x = 605, y = 796, z = 5}, direction=WEST },
{ position={x = 604, y = 796, z = 5}, direction=WEST },

{ position={x = 611, y = 795, z = 4}, direction=WEST },
{ position={x = 611, y = 796, z = 4}, direction=WEST },
{ position={x = 611, y = 797, z = 4}, direction=WEST },
{ position={x = 611, y = 798, z = 4}, direction=WEST },
{ position={x = 611, y = 799, z = 4}, direction=WEST },
{ position={x = 611, y = 800, z = 4}, direction=WEST },
{ position={x = 611, y = 801, z = 4}, direction=WEST },
{ position={x = 611, y = 802, z = 4}, direction=WEST },
{ position={x = 611, y = 803, z = 4}, direction=WEST },
{ position={x = 611, y = 804, z = 4}, direction=WEST },
{ position={x = 611, y = 805, z = 4}, direction=WEST },
{ position={x = 611, y = 806, z = 4}, direction=WEST },
{ position={x = 611, y = 807, z = 4}, direction=WEST },
{ position={x = 611, y = 808, z = 4}, direction=WEST },
{ position={x = 611, y = 809, z = 4}, direction=WEST },
{ position={x = 611, y = 810, z = 4}, direction=WEST },
{ position={x = 611, y = 811, z = 4}, direction=WEST },
{ position={x = 611, y = 812, z = 4}, direction=WEST },
{ position={x = 611, y = 813, z = 4}, direction=WEST },

{ position={x = 610, y = 795, z = 4}, direction=WEST },
{ position={x = 610, y = 796, z = 4}, direction=WEST },
{ position={x = 610, y = 797, z = 4}, direction=WEST },
{ position={x = 610, y = 798, z = 4}, direction=WEST },
{ position={x = 610, y = 799, z = 4}, direction=WEST },
{ position={x = 610, y = 800, z = 4}, direction=WEST },
{ position={x = 610, y = 801, z = 4}, direction=WEST },
{ position={x = 610, y = 802, z = 4}, direction=WEST },
{ position={x = 610, y = 803, z = 4}, direction=WEST },
{ position={x = 610, y = 804, z = 4}, direction=WEST },
{ position={x = 610, y = 805, z = 4}, direction=WEST },
{ position={x = 610, y = 806, z = 4}, direction=WEST },
{ position={x = 610, y = 807, z = 4}, direction=WEST },
{ position={x = 610, y = 808, z = 4}, direction=WEST },
{ position={x = 610, y = 809, z = 4}, direction=WEST },
{ position={x = 610, y = 810, z = 4}, direction=WEST },
{ position={x = 610, y = 811, z = 4}, direction=WEST },
{ position={x = 610, y = 812, z = 4}, direction=WEST },
{ position={x = 610, y = 813, z = 4}, direction=WEST },
{ position={x = 609, y = 812, z = 4}, direction=WEST },
{ position={x = 609, y = 813, z = 4}, direction=WEST },
{ position={x = 609, y = 814, z = 4}, direction=WEST },
{ position={x = 609, y = 794, z = 4}, direction=WEST },
{ position={x = 609, y = 795, z = 4}, direction=WEST },
{ position={x = 609, y = 796, z = 4}, direction=WEST },
{ position={x = 608, y = 814, z = 4}, direction=WEST },
{ position={x = 608, y = 813, z = 4}, direction=WEST },
{ position={x = 609, y = 812, z = 4}, direction=WEST },
{ position={x = 607, y = 813, z = 4}, direction=WEST },
{ position={x = 608, y = 796, z = 4}, direction=WEST },
{ position={x = 607, y = 795, z = 4}, direction=WEST },
{ position={x = 607, y = 794, z = 4}, direction=WEST },
{ position={x = 606, y = 794, z = 4}, direction=WEST },
{ position={x = 608, y = 795, z = 4}, direction=WEST },
{ position={x = 608, y = 812, z = 4}, direction=WEST },

{ position={x = 614, y = 792, z = 3}, direction=WEST },
{ position={x = 614, y = 793, z = 3}, direction=WEST },
{ position={x = 614, y = 794, z = 3}, direction=WEST },
{ position={x = 614, y = 795, z = 3}, direction=WEST },
{ position={x = 614, y = 796, z = 3}, direction=WEST },
{ position={x = 614, y = 797, z = 3}, direction=WEST },
{ position={x = 614, y = 798, z = 3}, direction=WEST },
{ position={x = 614, y = 799, z = 3}, direction=WEST },
{ position={x = 614, y = 800, z = 3}, direction=WEST },
{ position={x = 614, y = 801, z = 3}, direction=WEST },
{ position={x = 614, y = 802, z = 3}, direction=WEST },
{ position={x = 614, y = 803, z = 3}, direction=WEST },
{ position={x = 614, y = 804, z = 3}, direction=WEST },
{ position={x = 614, y = 805, z = 3}, direction=WEST },
{ position={x = 614, y = 806, z = 3}, direction=WEST },
{ position={x = 614, y = 807, z = 3}, direction=WEST },
{ position={x = 614, y = 808, z = 3}, direction=WEST },
{ position={x = 614, y = 809, z = 3}, direction=WEST },
{ position={x = 614, y = 810, z = 3}, direction=WEST },
{ position={x = 614, y = 811, z = 3}, direction=WEST },
{ position={x = 614, y = 812, z = 3}, direction=WEST },
{ position={x = 614, y = 813, z = 3}, direction=WEST },
{ position={x = 614, y = 814, z = 3}, direction=WEST },
{ position={x = 614, y = 815, z = 3}, direction=WEST },
{ position={x = 614, y = 816, z = 3}, direction=WEST },

{ position={x = 613, y = 792, z = 3}, direction=WEST },
{ position={x = 613, y = 793, z = 3}, direction=WEST },
{ position={x = 613, y = 794, z = 3}, direction=WEST },
{ position={x = 613, y = 795, z = 3}, direction=WEST },
{ position={x = 613, y = 796, z = 3}, direction=WEST },
{ position={x = 613, y = 797, z = 3}, direction=WEST },
{ position={x = 613, y = 798, z = 3}, direction=WEST },
{ position={x = 613, y = 799, z = 3}, direction=WEST },
{ position={x = 613, y = 800, z = 3}, direction=WEST },
{ position={x = 613, y = 801, z = 3}, direction=WEST },
{ position={x = 613, y = 802, z = 3}, direction=WEST },
{ position={x = 613, y = 803, z = 3}, direction=WEST },
{ position={x = 613, y = 804, z = 3}, direction=WEST },
{ position={x = 613, y = 805, z = 3}, direction=WEST },
{ position={x = 613, y = 806, z = 3}, direction=WEST },
{ position={x = 613, y = 807, z = 3}, direction=WEST },
{ position={x = 613, y = 808, z = 3}, direction=WEST },
{ position={x = 613, y = 809, z = 3}, direction=WEST },
{ position={x = 613, y = 810, z = 3}, direction=WEST },
{ position={x = 613, y = 811, z = 3}, direction=WEST },
{ position={x = 613, y = 812, z = 3}, direction=WEST },
{ position={x = 613, y = 813, z = 3}, direction=WEST },
{ position={x = 613, y = 814, z = 3}, direction=WEST },
{ position={x = 613, y = 815, z = 3}, direction=WEST },
{ position={x = 613, y = 816, z = 3}, direction=WEST },

{ position={x = 612, y = 792, z = 3}, direction=WEST },
{ position={x = 612, y = 793, z = 3}, direction=WEST },
{ position={x = 611, y = 792, z = 3}, direction=WEST },
{ position={x = 611, y = 793, z = 3}, direction=WEST },
{ position={x = 610, y = 792, z = 3}, direction=WEST },
{ position={x = 610, y = 793, z = 3}, direction=WEST },
{ position={x = 609, y = 793, z = 3}, direction=WEST },
{ position={x = 612, y = 815, z = 3}, direction=WEST },
{ position={x = 612, y = 816, z = 3}, direction=WEST },
{ position={x = 611, y = 815, z = 3}, direction=WEST },
{ position={x = 611, y = 816, z = 3}, direction=WEST },
{ position={x = 611, y = 817, z = 3}, direction=WEST },
{ position={x = 610, y = 815, z = 3}, direction=WEST },
{ position={x = 610, y = 816, z = 3}, direction=WEST },
{ position={x = 610, y = 817, z = 3}, direction=WEST },
{ position={x = 609, y = 816, z = 3}, direction=WEST },
{ position={x = 609, y = 817, z = 3}, direction=WEST },
{ position={x = 608, y = 816, z = 3}, direction=WEST },

{ position={x = 613, y = 818, z = 2}, direction=WEST },
{ position={x = 614, y = 818, z = 2}, direction=WEST },
{ position={x = 615, y = 818, z = 2}, direction=WEST },










{ position={x = 2924, y = 2611, z = 7}, direction=SOUTH },
{ position={x = 2914, y = 2633, z = 7}, direction=EAST },
{ position={x = 2955, y = 2644, z = 7}, direction=NORTH },
{ position={x = 2933, y = 2614, z = 7}, direction=WEST }
}

function onStartup(cid, item, pos)
for indx, npcLoc in ipairs(npcPositions) do
npcUid = getTopCreature(npcLoc.position).uid
doCreatureSetLookDirection(npcUid, npcLoc.direction)
end
return true
end
 
its possible that the positions may be incorrect, so it can't turn something that is nil
Code:
function onStartup(cid, item, pos)
    for indx, npcLoc in ipairs(npcPositions) do
        local pos = npcLoc.position
        local npcUid = getTopCreature(pos).uid
        if npcUid then
            doCreatureSetLookDirection(npcUid, npcLoc.direction)
        else
            print(string.format('NPC not found, Position: (%d, %d, %d) at index [%d]', pos.x, pos.y, pos.z, indx))
        end
    end
    return true
end
this should tell you what locations are incorrect
 
its possible that the positions may be incorrect, so it can't turn something that is nil
Code:
function onStartup(cid, item, pos)
    for indx, npcLoc in ipairs(npcPositions) do
        local pos = npcLoc.position
        local npcUid = getTopCreature(pos).uid
        if npcUid then
            doCreatureSetLookDirection(npcUid, npcLoc.direction)
        else
            print(string.format('NPC not found, Position: (%d, %d, %d) at index [%d]', pos.x, pos.y, pos.z, indx))
        end
    end
    return true
end
this should tell you what locations are incorrect


Thank you for your help, however I've copied all that and still get the same Error without the positions.. :(

[18:45:05.749] [Error - GlobalEvent Interface]
[18:45:05.757] data/globalevents/scripts/npcpositioning.lua:onStartup
[18:45:05.766] Description:
[18:45:05.768] (LuaInterface::luaDoCreatureSetLookDir) Creature not found
 
Thank you for your help, however I've copied all that and still get the same Error without the positions.. :(

[18:45:05.749] [Error - GlobalEvent Interface]
[18:45:05.757] data/globalevents/scripts/npcpositioning.lua:eek:nStartup
[18:45:05.766] Description:
[18:45:05.768] (LuaInterface::luaDoCreatureSetLookDir) Creature not found
try printing getCreatureName(npcUid)
 
oh for fucks sake the error is your directions
it should be like this
DIRECTION_NORTH
DIRECTION_WEST
etc
edit: nvm the error is its not finding creature but your directions should still be like that
 
Back
Top