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 03-01-2009, 06:19 AM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Smile 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.
Reply With Quote
  #2  
Old 03-01-2009, 06:51 AM
TSAdmin TSAdmin is offline
Forum Moderator
TSAdmin's Avatar
Join Date: Aug 2006
Location: Australia
Posts: 1,980
TSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to behold
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.
__________________
TSAdmin (Forum Moderator)
Welcome to the Official GraalOnline Forums! Where sharing an opinion may be seen as a declaration of war!
------------------------
· User Agreement · Code of Conduct · Forum Rules ·
· Graal Support · Administrative Contacts ·
Reply With Quote
  #3  
Old 03-01-2009, 06:55 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Quote:
Originally Posted by TSAdmin View Post
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.
__________________

Reply With Quote
  #4  
Old 03-01-2009, 02:54 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by oo_jazz_oo View Post
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..
__________________
Reply With Quote
  #5  
Old 03-02-2009, 08:31 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
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 ****.

Last edited by Darlene159; 03-04-2009 at 02:15 AM.. Reason: Removed deleted quote
Reply With Quote
  #6  
Old 03-02-2009, 09:58 AM
TSAdmin TSAdmin is offline
Forum Moderator
TSAdmin's Avatar
Join Date: Aug 2006
Location: Australia
Posts: 1,980
TSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to beholdTSAdmin is a splendid one to behold
Quote:
Originally Posted by Bl0nkt View Post
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 View Post
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.
__________________
TSAdmin (Forum Moderator)
Welcome to the Official GraalOnline Forums! Where sharing an opinion may be seen as a declaration of war!
------------------------
· User Agreement · Code of Conduct · Forum Rules ·
· Graal Support · Administrative Contacts ·

Last edited by Darlene159; 03-04-2009 at 02:15 AM.. Reason: Removed deleted part of quote
Reply With Quote
  #7  
Old 03-02-2009, 04:30 PM
Ronnie Ronnie is offline
Registered User
Join Date: Jun 2008
Location: Nj, USA
Posts: 48
Ronnie is on a distinguished road
Send a message via AIM to Ronnie
Quote:
clientr.m16on=1
Also, note that you can't really set clientr.strings clientside.
Reply With Quote
  #8  
Old 03-03-2009, 11:54 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
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
Reply With Quote
  #9  
Old 03-04-2009, 02:03 AM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by GULTHEX View Post
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?
Reply With Quote
  #10  
Old 03-04-2009, 02:10 AM
Darlene159 Darlene159 is offline
Administrator
Darlene159's Avatar
Join Date: Aug 2001
Location: Florida
Posts: 12,470
Darlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud of
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.
__________________
FORUM RULES
GRAAL BIBLE (Lots of useful info)
INFO ABOUT REPUTATIONS.
INFO ABOUT INFRACTIONS.
HOW TO APPLY FOR THE NON-GRAAL RELATED FORUM (<<READ THOROUGHLY!)

SUPPORT: http://support.toonslab.com

NOTE: YOU ARE RESPONSIBLE FOR YOUR OWN POSTS.
READ>THINK>POST
Reply With Quote
  #11  
Old 03-04-2009, 02:56 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
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.
Reply With Quote
  #12  
Old 03-04-2009, 10:54 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Thank you Darlene I will note what you said.
oh and also why is BL0nkt banned?
Reply With Quote
  #13  
Old 03-07-2009, 03:53 PM
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
Quote:
Originally Posted by GULTHEX View Post
Thank you Darlene I will note what you said.
oh and also why is BL0nkt banned?
Because your so awesome!
- Your #1 Fan
__________________
Quote:
Reply With Quote
  #14  
Old 03-08-2009, 07:30 PM
Novice Novice is offline
Developer
Join Date: Dec 2008
Posts: 90
Novice is an unknown quantity at this point
Send a message via MSN to Novice
Quote:
Originally Posted by GULTHEX View Post
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]
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 06:48 AM.


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