Thread: Say Links
View Single Post
  #28  
Old 05-20-2009, 05:19 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Drakelord, I think you are overestimating my code knowledge lol. I work purely from examples, so if I can't find something that does nearly exactly what I want to do from somewhere else in the source, I probably can't do it. I have learned a ton in the past year, but still have no technical training at all lol. I think determination is the only reason why I can even code at all.

Basically, I am asking that you give me an example of what you mean. I can't find anywhere in the source where we query to get a string and use it. Maybe if I think about it more I can figure out a place that might do that.

EDIT:
Checked into it a bit more from other stuff in the source and maybe I can just do this:


Code:
				if(database.RunQuery(query,MakeAnyLenString(&query,"SELECT `phrase` FROM saylink WHERE `id` = '%i'", sayid),errbuf,&result))
				{

					if (mysql_num_rows(result) == 1)
					{
						row = mysql_fetch_row(result);

						strcpy(response, row[0]);
					}
						
					mysql_free_result(result);
					safe_delete_array(query);
				}
I will try that later and see what happens.

Oh, and I just realized that I had "response" instead of "sayid" in that query, so I corrected that. I am sure that was my problem the whole time lol (or the main one anyway).
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 05-21-2009 at 05:42 AM..
Reply With Quote