Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Translation, please?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Fri Jan 16, 2004 4:57 pm    Post subject: Translation, please? Reply with quote

I keep getting this warning, which I believe is causing my script to not work. Could
somebody explain what the issue may be?
(I get about 30 different instances of it; the problem seems to have something to do with
local variable-passing)

WARNING: in line 740 of script countreserves in querybattles.hss
if(herobyslot(6) >= 1) then(count == count + 1)
built-in function equal is returning a value that isnt being discarded.

'count' is a local variable.[/code]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Fri Jan 16, 2004 5:04 pm    Post subject: Reply with quote

Wait, nevermind, I was using the wrong "=" command. I always get that wrong. >_>
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sephyroth
Renegade Rebel Redmage
Class A Minstrel



Joined: 04 Feb 2003
Posts: 644
Location: Schmocation

PostPosted: Sat Jan 17, 2004 9:44 am    Post subject: Reply with quote

I don't see why you don't use "increment(count)" instead.
_________________
im realy ded Sad...
Back to top
View user's profile Send private message Send e-mail AIM Address
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Sat Jan 17, 2004 10:45 am    Post subject: Reply with quote

Potato, potato.
This is the way I do it in C, and it works just as well.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
T-Master




Joined: 10 Dec 2003
Posts: 74

PostPosted: Sat Jan 17, 2004 2:53 pm    Post subject: Reply with quote

Dear Sephy,

VERBOSE COMMANDS ARE N00BBB!!

Sincerely,
Super Rare
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Jan 17, 2004 5:50 pm    Post subject: Reply with quote

Thank you ZB, I've learnt more from your post than the rest of the Board put together.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
SDHawk
Silent One




Joined: 06 Jan 2003
Posts: 80

PostPosted: Sat Jan 31, 2004 1:16 pm    Post subject: Reply with quote

The proper way to do that in C would be count++; not count = count+1;
_________________
"Why is it when they say an adult has the mind of a Sew, they lock him up, while Sews are allowed to run free in the streets."


Back to top
View user's profile Send private message
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Sat Jan 31, 2004 5:48 pm    Post subject: Reply with quote

A. Whoops, I meant C++. And it works perfectly well in that...
B. Verbose commands are still for noobies!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SDHawk
Silent One




Joined: 06 Jan 2003
Posts: 80

PostPosted: Sat Jan 31, 2004 6:15 pm    Post subject: Reply with quote

Actually, that applys to both Cs- in fact, that's where C++'s name comes from...C increased one step. The main reasoning I'd assume is it's faster to type, and probably slightly faster to call (with the =, it has to look up the variable twice, although don't quote me on that part).
_________________
"Why is it when they say an adult has the mind of a Sew, they lock him up, while Sews are allowed to run free in the streets."


Back to top
View user's profile Send private message
Cube
Dimensional Traveller




Joined: 02 Feb 2003
Posts: 294

PostPosted: Sat Jan 31, 2004 7:35 pm    Post subject: Reply with quote

Quote:
Verbose commands are for noobies!


I use increment() ;-;. To me, it's the equivalent of "variable++" in C++... Faster and easier to type for me, heh. But hey, to each his own, right? Wink
Back to top
View user's profile Send private message
Flamer
The last guy on earth...




Joined: 04 Feb 2003
Posts: 725
Location: New Zealand (newly discovered)

PostPosted: Sun Feb 01, 2004 12:10 am    Post subject: Reply with quote

it's all good... i suppose.
i myself don't like verbose either, but i've got nothing against it.
_________________
If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch Raspberry!
(no offense to anyone that was mentioned)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
T-Master




Joined: 10 Dec 2003
Posts: 74

PostPosted: Sun Feb 01, 2004 1:15 pm    Post subject: Reply with quote

In no case is "increment(var, 1)" faster to type than "var++;". The first is longer in length by a significant amount, and has two keystrokes on the number row. The second also has two keystrokes on the number row, but they are the same key. If you're using the numpad to type "+", you're doing it wrong.

Kidding aside though, some people understand the code better if it's verbose, and that's a good enough argument for me.
Back to top
View user's profile Send private message
Flamer
The last guy on earth...




Joined: 04 Feb 2003
Posts: 725
Location: New Zealand (newly discovered)

PostPosted: Sun Feb 01, 2004 2:35 pm    Post subject: Reply with quote

it actually can be written as "increment(var)"
as it is default to add one, if the arguement is left out.

probably one reason people use verbose is for the understanding.
_________________
If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch Raspberry!
(no offense to anyone that was mentioned)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group