Login    Forum    Search    FAQ

Board index » Scenarios & Scripting




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: More help would be requested
 Post Posted: Sun May 02, 2010 1:23 am 
Offline

Joined: Thu Nov 26, 2009 4:10 am
Posts: 829
I'm working on some more advanced scripts lately, but I'm having muchos problemos as usual. Knowing the reliability of the TFW community, I'll turn to you guys once again.

{Script,Rebeling Peasants! (Advanced),177} is the problem. It's also been publicized in order to have the experts look at it's guts. :)


Top 
 Profile  
 
 Post subject: Re: More help would be requested
 Post Posted: Sun May 02, 2010 1:25 am 
Offline

Joined: Mon Mar 02, 2009 11:00 am
Posts: 150
int x = 0;
int y = 0;

should be outside the onNewRound function otherwise they get reset every round

createEntity("Pilgrim",rando,randi,aiPlayer);
createEntity("Pilgrim",rando,randi,aiPlayer);
createEntity("Pilgrim",rando,randi,aiPlayer);

will try to create 3 pilgrims in the same random location. rando, randi need to be re randomized between them.
You could create a function to do this like
int randi(){
return rand(11);
}

in y=7 the same location is being set twice

I also don't see the entityCallback function in there

_________________
ȁ̎̉̈̂̎͋̈́̍n͂͑̿ͥͣ́̓ġͤ͑ͯe͌̓̊ͩ͗̅l̽̓ͬͬͥ̊͗aͣ̔̃ͧ̓̾̾t͊̑̆hͤ͆̓̉̌ͣ̚e̋ͩ͒̈́ĭ̌̒̎ͧ̓̋ͪs̋ͤͧ̅̇̋̎ͫ̂̾ͨ̽̄ͫͯt͒͐̌ͭ̂̃ͪ̽ͣ͗̒ͣ


Top 
 Profile  
 
 Post subject: Re: More help would be requested
 Post Posted: Sun May 02, 2010 3:42 am 
Offline

Joined: Thu Nov 26, 2009 4:10 am
Posts: 829
The only thing I'm not getting is callback. Hopefully you can put that into code for me?


Top 
 Profile  
 
 Post subject: Re: More help would be requested
 Post Posted: Sun May 02, 2010 3:31 pm 
Offline

Joined: Thu Nov 26, 2009 4:10 am
Posts: 829
I'm trying to fix it, but I think a little more help is needed.
Current Errors so far:
Compile Errors:
line:60, col:7 : Expression must be of boolean type
line:67, col:7 : Expression must be of boolean type
line:72, col:4 : No matching signatures to 'statusMsg(string&)'
line:74, col:5 : Expression must be of boolean type
line:82, col:7 : Expression must be of boolean type
line:87, col:4 : No matching signatures to 'statusMsg(string&)'
line:95, col:4 : No matching signatures to 'statusMsg(string&)'
line:97, col:5 : Expression must be of boolean type


Top 
 Profile  
 
 Post subject: Re: More help would be requested
 Post Posted: Sun May 02, 2010 11:14 pm 
Offline

Joined: Mon Mar 02, 2009 11:00 am
Posts: 150
take a look at {Script,Rebelling Peasants! (fixed),183}

_________________
ȁ̎̉̈̂̎͋̈́̍n͂͑̿ͥͣ́̓ġͤ͑ͯe͌̓̊ͩ͗̅l̽̓ͬͬͥ̊͗aͣ̔̃ͧ̓̾̾t͊̑̆hͤ͆̓̉̌ͣ̚e̋ͩ͒̈́ĭ̌̒̎ͧ̓̋ͪs̋ͤͧ̅̇̋̎ͫ̂̾ͨ̽̄ͫͯt͒͐̌ͭ̂̃ͪ̽ͣ͗̒ͣ


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 5 posts ] 

Board index » Scenarios & Scripting


Who is online

Users browsing this forum: No registered users and 4 guests

 
 

 
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:  
cron