Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
A little confused...
Goto page Previous  1, 2
 
Post new topic   Reply to topic Printable version
 View previous topic  Creating a bot Post :: Post S2C weapons packet - weapon info  View next topic  
Author Message
Zamin
Newbie


Joined: Mar 03 2006
Posts: 14
Offline

PostPosted: Tue Aug 04, 2009 11:20 pm    Post subject: Reply to topic Reply with quote

Bak wrote:
your function is defined as returning a void (not returning any value) but it should actually return an integer. Change the return value in the signature to int:

Quote:
int addition(int a, int b)
{
int z;
z = a + b;
return z;
}


Also, I'm fairly certain the semicolon after the return is mandatory, perhaps you're thinking of another language.


ZOMG!!! Can't believe i made such a dumb mistake. I'm just kinda happy I wasn't missing like a semicolon or something even more small. Thanks for the solution man.

Sama I checked, I dunno why but I must exit Mervbot to delete my default.dll plugin. Whatever, it doesn't really bother me much.

I have another question, lol. Sorry for asking so many questions. Its just that I'm taking computer systems and I'm kinda interested int his stuff.

I remember making simple programs like getting input from user and then working with it to get your answer. For example, get input from user such as their name, and date of birth. Then compute their current age.

Is there a way to get input from user using a plugin?? I mean, I can send them pm of a text line.

For example, user types !start and they get a welcome message. Then the bot asks the user of his/her name. Is there a way for the user to give this input to the bot and then the bot saves this into a variable?

I did c++ using cin/cout. This is kinda different to me. I used to do something like:
Code: Show/Hide
int age;
cout << "enter age: ";
cin >> age;


Please let me know if something like this is possible.

-Thanks in advance
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:19
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Tue Aug 04, 2009 11:26 pm    Post subject: Reply to topic Reply with quote

The player commands section of the mervbot tutorial covers receving integers and such from players as parameters to !commands ( http://wiki.minegoboom.com/index.php/MERVBot_Tutorial#Player_Commands_-_.28command.cpp.29 ). You can, of course, make a global variable to store this information. Alternatively, it's probably a better idea to use the built-in tag system ( http://wiki.minegoboom.com/index.php/MERVBot_Tutorial#Storing_data_for_pilots ).


As for you not being to replace the .dll, I suspect you're not unloading the plugin (are you?).
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 134 page(s) served in previous 5 minutes.

phpBB Created this page in 0.122003 seconds : 26 queries executed (77.8%): GZIP compression disabled