View unanswered posts | View active topics It is currently Sat Dec 28, 2024 4:24 pm



Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
 Newbie scripting questions 
Author Message

Joined: Thu Dec 22, 2011 9:10 am
Posts: 15
Reply with quote
Post Re: Newbie scripting questions
Maybe you guys can help me? viewtopic.php?f=1&t=28358


Sun Jan 01, 2012 12:07 pm
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: Newbie scripting questions
Zazix wrote:
Ouch, I didn't even notice that spelling error. Found quite a few more going down the lines, so hopefully that'll solve a few more problems. The extra tabs seem to have worked as well, although now it's telling me that it can't find the property of line 11, which would be the Color = Color bit. I tried messing with the tabbing, but it still takes issue with it for some reason. If it isn't the tabbing that's the problem, I can't really think of what else would be, as it's pretty hard to misspell Color (unless CC requires me to use the British version, Colour)

Nah, CC uses 'murican spelling through and through. However, i noticed that it says GetsHitsByMOs, the underlined S being the typo (in other words, take it out). CC is incredibly unforgiving when it comes to spelling, so copy-pasta is the best course of action. Also, when it gives you a line where the error occurs, look at the nearby lines too. I've only very rarely have it point out the exact line with an error.

Worth noting, however, is that it doesn't count empty or commented-out (preceded by //) lines, so depending on how many of those you have, you can have a pretty significant inaccuracy in the pointing.


Mon Jan 02, 2012 4:40 pm
Profile WWW

Joined: Wed Dec 14, 2011 3:46 am
Posts: 20
Reply with quote
Post Re: Newbie scripting questions
Shook wrote:
Zazix wrote:
Ouch, I didn't even notice that spelling error. Found quite a few more going down the lines, so hopefully that'll solve a few more problems. The extra tabs seem to have worked as well, although now it's telling me that it can't find the property of line 11, which would be the Color = Color bit. I tried messing with the tabbing, but it still takes issue with it for some reason. If it isn't the tabbing that's the problem, I can't really think of what else would be, as it's pretty hard to misspell Color (unless CC requires me to use the British version, Colour)

Nah, CC uses 'murican spelling through and through. However, i noticed that it says GetsHitsByMOs, the underlined S being the typo (in other words, take it out). CC is incredibly unforgiving when it comes to spelling, so copy-pasta is the best course of action. Also, when it gives you a line where the error occurs, look at the nearby lines too. I've only very rarely have it point out the exact line with an error.

Worth noting, however, is that it doesn't count empty or commented-out (preceded by //) lines, so depending on how many of those you have, you can have a pretty significant inaccuracy in the pointing.


Interesting, I'll have a look through the Annotated Pistol .ini and see if I can't draw any conclusions by comparison then. Although, does the Color = Color require any specific syntax or is it a part of a specific syntax? What I mean is, can I just throw the Color = Color anywhere in the AddEffect chunk of code or must it precede/go after another line(s) of code? Because just looking at it right now the only thing left I can deduce is wrong would be a syntax error.


Mon Jan 02, 2012 10:47 pm
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: Newbie scripting questions
Well, you could PROBABLY take the whole Color = Color chunk (include the RGB values, their tabbing makes them part of it) and plop it anywhere in the MOPixel definition, but you should probably stick with what the vanilla content is doing. Thing is, you're already doing that. I'm pretty sure that extra S in GetsHitByMOs (as opposed to GetsHitsByMOs) is the last error, at least for that MOPixel.

In fact, i posit a theory: All variables within the same group with the same level of tabbing can be switched around freely. CC didn't seem to care much about where i placed things like GoldValue, scripts and attached emitters, so i think it holds water for the most part.


Mon Jan 02, 2012 11:33 pm
Profile WWW
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Newbie scripting questions
You're correct, all variables with the same tab depth can be mixed and flipped around as much as you like.


Tue Jan 03, 2012 12:22 am
Profile

Joined: Wed Dec 14, 2011 3:46 am
Posts: 20
Reply with quote
Post Re: Newbie scripting questions
Gah, no matter what I do, it keeps telling me there's something wrong with line 11! I'm just going to scrap this script and start fresh, work from the annotated pistol file, and play around with it a few lines at a time until I understand what works and what doesn't.

A huge thanks to all you guys for all the patience and helpful advice! You've taken me as far as you can, the rest I'll have to do myself using good ol' fashioned spell checking and gumption.


Sat Jan 07, 2012 12:27 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 21 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.039s | 16 Queries | GZIP : Off ]