View Single Post
  #16  
Old 02-23-2011, 02:05 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by fowlplay4 View Post
Right, well it doesn't work because you're trying to use triggerserver in a level npc.
Quote:
Originally Posted by Astram View Post
PHP Code:
function onActionServerSide(cmd)
{
if (
cmd == "buy")
{
player.rupees -= thiso.price;
addweapon(thiso.weapon);
}

thiso.price and thiso.weapon are undefined on the serverside, you need to use the params you are sending in triggerserver, you need to invoke the object for addweapon (player.addweapon())

You also really shouldn't define the weapon name and cost on the clientside since it opens it up for all sorts of abuse.
Reply With Quote