Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Variable Help (https://forums.graalonline.com/forums/showthread.php?t=134264299)

Astram 08-24-2011 03:46 AM

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;
 } 


fowlplay4 08-24-2011 03:49 AM

Try using a different word than type or using temp.type as the function parameter.

Astram 08-24-2011 03:51 AM

Quote:

Originally Posted by fowlplay4 (Post 1665064)
Try using a different word than type or using temp.type as the function parameter.

No difference

fowlplay4 08-24-2011 03:53 AM

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.

Astram 08-24-2011 03:58 AM

Quote:

Originally Posted by fowlplay4 (Post 1665067)
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

fowlplay4 08-24-2011 04:09 AM

All server option variables are accessible on the server-side via the serveroptions. prefix.

I.e: serveroptions.staff is staff= in server options.

Astram 08-24-2011 04:18 AM

Quote:

Originally Posted by fowlplay4 (Post 1665071)
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


All times are GMT +2. The time now is 11:11 PM.

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