Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

script not compiling?

Page: 1 of 1
 Canderis
10-20-2008, 7:15 PM
#1
i am trying to compile this script
TakeGoldFromCreature(n100, GetFirstPC());
but it keeps saying 'syntax error' what am i doing wrong?
(ps. got script from http://www.lucasforums.com/showthread.php?t=143412) )
 RedHawke
10-21-2008, 3:29 AM
#2
Change...
TakeGoldFromCreature(n100, GetFirstPC());

To...
TakeGoldFromCreature(100, GetFirstPC());
You shouldn't need the 'n'. ;)
 Det. Bart Lasiter
10-21-2008, 6:31 AM
#3
the letter prefixes are for when you feel the need to be, as linus torvalds said "brain damaged" and use hungarian notation (http://www.learncpp.com/cpp-tutorial/29-hungarian-notation/) for your variable names. a number like 100 is a literal though, so you can't prefix it like that.
 Canderis
10-21-2008, 8:28 AM
#4
Its still not compiling right.
i get told that syntax error at 'TakeGoldFromCreature'
 Trex
10-21-2008, 8:51 AM
#5
Its still not compiling right.
i get told that syntax error at 'TakeGoldFromCreature'

Are you adding void main? The full thing should be


void main() {
TakeGoldFromCreature(100, GetFirstPC());
}
 Canderis
10-21-2008, 4:58 PM
#6
Thanks trex. That did the trick.
Page: 1 of 1