Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-25-2011, 10:55 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
triggerserver wont work?

Well the script seems like itīs not triggering the server. Where is the error?

Here are some parts of the script:

This way it wont work
PHP Code:
function onActionServerSide() {
  echo(
"debug");
}

//#CLIENTSIDE
public function FireWeapon(stats) {
  
temp.action stats[0];
  
temp.freeze stats[1];
  
temp.power stats[2];
  
temp.ganis stats[3]; //walk, idle, weapon
  
temp.wname stats[4];
  
onMelee(freezepowerganiswname);
  
//triggering the server right here would work
}

function 
onMelee(freezepowerganisname) {
  
triggerServer("gui"name"Attack"); //here it wont work

but like this it would work:
PHP Code:
function onActionServerSide() {
  echo(
"debug");
}

//#CLIENTSIDE
public function FireWeapon(stats) {
  
onMelee();
}

function 
onMelee() {
  
triggerServer("gui"name"Attack"); //here it works

__________________
MEEP!
Reply With Quote
  #2  
Old 12-25-2011, 10:59 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Some of your variable and function names seem like they could be reserved. Change them!
__________________
Reply With Quote
  #3  
Old 12-25-2011, 11:48 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
You are creating a local instance of the symbol "name" in your onMelee function signature, then the trigger is using that (so use this.name or change the function signature to resolve the name clash).
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #4  
Old 12-26-2011, 12:36 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by Tolnaftate2004 View Post
You are creating a local instance of the symbol "name" in your onMelee function signature, then the trigger is using that (so use this.name or change the function signature to resolve the name clash).
Oh thanks didnīt see that one
__________________
MEEP!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:38 AM.


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