Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #17  
Old 04-28-2007, 07:01 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by oo_jazz_oo View Post
One last thing. ><
I cant get the weapon to add to the player. =/
I have tried everything....whats wrong with this?
My guess is this little bit right here

PHP Code:
triggeraction(0,0,"serverside","-Shop","addw",@this.item); 
for one you dont need the @ at the start of the param, nor do you need it on the serverside (addweapon).
You never actually set anywhere in any of your script what this.item is.

but if you did trying

PHP Code:
triggeraction(00"serverside""-Shop""addw"thiso.item); 
and

PHP Code:
function onActionServerside() {
 if (
params[0] == "addw") {
  
addweapon(params[1]);
 }

was what you were looking for?

Edit:

It also seems to me like you almost by Habit use @ at the start of variables for example

PHP Code:
if (client.money >=@this.price){ 
Might not work? Anyways that could/should be rewritten as

PHP Code:
if (client.money >= this.price){ 
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.