Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Script help please reply fast (https://forums.graalonline.com/forums/showthread.php?t=84440)

GULTHEX 03-01-2009 06:19 AM

Script help please reply fast
 
PHP Code:

//#CLIENTSIDE
if (weaponfired) {
 
this.attackpower 15;
 
clientr.m16on=1
  
if (this.m16on 1) {
  function 
onKeyPressedcodekey ) {
  if ( 
key == "f" ) {
        
setani dg_m16-fire,;
    
freezeplayer 0.1;
  
setshootparams bullet2;
  
shoot playerx,playery,playerz,
    
getangle(vecx(playerdir),vecy(playerdir)),
    
0,0,
    
dg_bullet,dg_m16-fire;
    
setani dg_m16-fire,;
    
freezeplayer 0.1;
    }
    }
} else if (
this.m16on == ) {
setani dg_punch,;
    }
    } 

it says

Script compiler output for gtest:
<b>error: missing semicolon at line 5: if (this.m16_on = 1) {
Weapon/GUI-script gtest added/updated by GULTHEX


i dont see whats wrong with it it does not need a semicolin there.

TSAdmin 03-01-2009 06:51 AM

You've put your onKeyPressed() function inside your already open (WeaponFired) function, so since a new function has been opened, it's expecting that you've not ended your previous function.

oo_jazz_oo 03-01-2009 06:55 AM

Quote:

Originally Posted by TSAdmin (Post 1470246)
You've put your onKeyPressed() function inside your already open (WeaponFired) function, so since a new function has been opened, it's expecting that you've not ended your previous function.

This. And also, the error comes from clientr.m16on=1
You have no semicolin to end that line, so it reads as an error. But also fix what tsadmin said too.

Chompy 03-01-2009 02:54 PM

Quote:

Originally Posted by oo_jazz_oo (Post 1470248)
This. And also, the error comes from clientr.m16on=1
You have no semicolin to end that line, so it reads as an error. But also fix what tsadmin said too.

Indeed.

Also, please style the script next time, so it's easier to read for others.

PHP Code:

//#CLIENTSIDE
if (weaponfired) {
  
this.attackpower 15;
  
clientr.m16on=1
  
if (this.m16on 1) {
    function 
onKeyPressedcodekey ) {
      if ( 
key == "f" ) {
        
setani dg_m16-fire,;
        
freezeplayer 0.1;
        
setshootparams bullet2;
        
shoot playerx,playery,playerz,getangle(vecx(playerdir),vecy(playerdir)),0,0,dg_bullet,dg_m16-fire;
        
setani dg_m16-fire,;
        
freezeplayer 0.1;
      }
    }
  }
  else if (
this.m16on == ) {
    
setani dg_punch,;
  }


The use of an event inside an event is not good either, and I don't see any use to check when the player presses D while the default system is enabled, as you're trying to use the key F..

Bl0nkt 03-02-2009 08:31 AM

a semicolon isn't the problem with the script. He has various syntax errors and he tried to incorporate a GS2 function within the same code block as a GS1 conditional. If he's going to learn the problem with his script, he's going to have to accept the help from the people who know what they're doing. Instead, he's being a blatant and ignorant ****.

TSAdmin 03-02-2009 09:58 AM

Quote:

Originally Posted by Bl0nkt (Post 1470557)
a semicolon isn't the problem with the script. He has various syntax errors and he tried to incorporate a GS2 function within the same code block as a GS1 conditional. If he's going to learn the problem with his script, he's going to have to accept the help from the people who know what they're doing. Instead, he's being a blatant and ignorant ****.

Apart from this, there is the fact that he has indeed already been told about the semicolon:

Quote:

Originally Posted by oo_jazz_oo (Post 1470248)
This. And also, the error comes from clientr.m16on=1
You have no semicolin to end that line, so it reads as an error. But also fix what tsadmin said too.


Ronnie 03-02-2009 04:30 PM

Quote:

clientr.m16on=1
Also, note that you can't really set clientr.strings clientside.

GULTHEX 03-03-2009 11:54 PM

WHERE THE **** DO I LEARN THEN

NOBODY TAUGHT ME


I LEARNED FROM LOOKING AT CODE GALAREY

SO THATS GOOD JUST FOR LOOKING AT THE SCRIPTS THERE

AND KNOWING HOW TO SCRIPT CRAP

and closed

i fixed it

i did it with all gs2

Codein 03-04-2009 02:03 AM

Quote:

Originally Posted by GULTHEX (Post 1471116)
WHERE THE **** DO I LEARN THEN

NOBODY TAUGHT ME


I LEARNED FROM LOOKING AT CODE GALAREY

SO THATS GOOD JUST FOR LOOKING AT THE SCRIPTS THERE

AND KNOWING HOW TO SCRIPT CRAP

and closed

i fixed it

i did it with all gs2

But your code is in GS1?

Darlene159 03-04-2009 02:10 AM

Gulthex, there are a few people who will try to help you, but there seem to be more that will only insult you. Ignore them, and let those who are willing to help you, help you.
Don't get angry and insult people, or use bad language, it doesn't help. Listen to those who are trying to help you.

Bl0nkt 03-04-2009 02:56 AM

He's not gonna learn **** if you keep deleting the posts that will persuade him to stop his nonsense, Darlene.

Unless you wanna teach him.

GULTHEX 03-04-2009 10:54 PM

Thank you Darlene I will note what you said.
oh and also why is BL0nkt banned?

fowlplay4 03-07-2009 03:53 PM

Quote:

Originally Posted by GULTHEX (Post 1471430)
Thank you Darlene I will note what you said.
oh and also why is BL0nkt banned?

Because your so awesome!
- Your #1 Fan

Novice 03-08-2009 07:30 PM

Quote:

Originally Posted by GULTHEX (Post 1471430)
Thank you Darlene I will note what you said.
oh and also why is BL0nkt banned?

Discussing bans is illegal in the wonderful world of Graal. [/delete+warning]


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

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