View Single Post
  #64  
Old 02-13-2014, 06:37 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally Posted by iDigzy View Post
Thanks for the reply, but I'm still having trouble with them. I tried to make a simple npc where when the player touchs it, it will chat the databases flag. In the database I have
PHP Code:
function onCreated()
{

  
this.item_100 "test";

inside the npc on serverside is
PHP Code:
function onPlayerTouchsMe() {
  
this.chat DB_test.("item_100" this.item);

this ends up not setting the chat to test and ends up making it 0, so I assume I identified the flag wrong?

Right. What is the name of your database? Your script says its DB_test

Also, you need to indicate the item id in the npc you're touching somewhere: ex:
this.item = 100;

Then reference it like this:
this.chat = DB_test.("item_" @ this.item);
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote