Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-24-2011, 03:46 AM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Variable Help

I can't find out why this function doesn't make the weapon's this.TGuild_Button5's type 1. Heres my line of code.
PHP Code:
function setButtonTypeobjtype) {
  
with(obj) {
    if (
type == 1) {
      
red 0.5;
       
green 0.5;
       
blue 0.5;    
       
this.(@ obj "_Type") = type;
     }
   }
   
player.chat this.TGuild_Button5_Type;
 } 
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #2  
Old 08-24-2011, 03:49 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Try using a different word than type or using temp.type as the function parameter.
__________________
Quote:
Reply With Quote
  #3  
Old 08-24-2011, 03:51 AM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Quote:
Originally Posted by fowlplay4 View Post
Try using a different word than type or using temp.type as the function parameter.
No difference
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #4  
Old 08-24-2011, 03:53 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Also you have to use thiso instead of this:

thiso.(@ obj @ "_Type") = type;

In your script this would refer to obj and not the weapon thiso.
__________________
Quote:
Reply With Quote
  #5  
Old 08-24-2011, 03:58 AM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Quote:
Originally Posted by fowlplay4 View Post
Also you have to use thiso instead of this:

thiso.(@ obj @ "_Type") = type;

In your script 'this' would refer to obj and not the weapon 'thiso'.
Thanks, I learned thiso prefix now :P
And it works fine, thanks your help! And one thing, I know this is a little off-topic but whats the variable for the staff in server options like in serverside.
PHP Code:
temp.staff serveroptions.staff.tokenize(","); 
something like that
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #6  
Old 08-24-2011, 04:09 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
All server option variables are accessible on the server-side via the serveroptions. prefix.

I.e: serveroptions.staff is staff= in server options.
__________________
Quote:
Reply With Quote
  #7  
Old 08-24-2011, 04:18 AM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Quote:
Originally Posted by fowlplay4 View Post
All server option variables are accessible on the server-side via the serveroptions. prefix.

I.e: serveroptions.staff is staff= in server options.
Okay thanks for your help!
"You must spread some reputation around before giving some to fowlplay4 again"
You're a great help
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
Reply


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 04:55 AM.


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