Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function serverCmdcheckProfileOne(%username)
- {
- echo("----------------------------Check Profile 1 DB Connect----------------------------");
- Deleted this to protect my db info :)
- echo("------------Check Profile 1 DB Connected--------------");
- %mysql.Query ("SELECT * FROM profile1 WHERE characterid=\"" @ %username @ "\"");
- %result= %mysql.StoreResult();
- echo("Query Result = ", %result);
- echo("Ran Query");
- for (%i= 0; %i< %mysql.NumRows (%result); %i++)
- {
- echo("Running for statment");
- %mysql.FetchRow (%result);
- %characterid = %mysql.GetRowCell (%result, "characterid");
- %CharacterName = %mysql.GetRowCell (%result, "CharacterName");
- echo ("Character ID = ", %characterid);
- echo ("Character Name = ", %CharacterName);
- echo("End of GetRow ");
- echo("if statment next ");
- if (%CharacterName == "")
- {
- echo("Character Name = ", %CharacterName);
- echo("Character ID = ", %characterid);
- echo("String is = to 0");
- commandToClient(%client, 'CreateProfile1');
- }
- else
- {
- echo(" String is not = to 0");
- commandToClient(%client, 'loadProfile1', %characterid, %CharacterName);
- }
- echo("Skipped If Statment in Check Profile One.");
- }
- echo("Closed Database");
- %mysql.FreeResult(%result);
- %mysql.Close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement