Our of boundries, script doesn't load.
#1

I have this script, but after I click 'Register' and then 'Spawn'
It gives me a white screen and 'Stay within world boundries.'
It'll be appreciated if anyone else will test it.
http://pastebin.com/5fMvLV3c
I have no fucking idea whether it's related to MySQL or the script itself.
Reply
#2

I had exactly the same problem, and i solved it adding at least one AddPlayerClass at OnGameModeInit
Reply
#3

I fixed it, but MySQL_CreateAccount is not executed.
Reply
#4

Are u sure? It's impossible seeing your code.

Try a debug there:

pawn Код:
public MySQL_CheckAccount(playerid){
    GetPlayerName(playerid,PlayerName,25);
    format(s_Query,sizeof(s_Query),"SELECT * FROM `accounts` WHERE sUser = '%s'",PlayerName);
    mysql_function_query(s_MySQL,s_Query,true,"s@MySQL_CheckAccount","d",playerid);
    printf("Checking for: %s",PlayerName);
    return 1;
}
By the way, i was reading something about MySQL doesn't supporting 'localhost', you should use 127.0.0.1 or you local network ip adress...

@Edit FAIL, i've made a mistake with Create and Check, hehe

I dont't really know if it works

pawn Код:
if( 5 < (strlen(inputtext)) > 25)
But i'm sure this way works:

pawn Код:
if(strlen(inputtext) < 5 || strlen(inputtext) > 25)
    return Something;
Reply
#5

It writes it, but I don't know where it stores it, phpMyAdmin, right?
Reply
#6

Take a look at my post edit... /\

Whenever you call a mysql_query_function, MySQL plugin works, then pass the values you want to a response callback, in your case r@MySQL_CreateAccount
Reply
#7

Same.
Can you test it yourself, please? I have no idea what to do.
EDIT:
pawn Код:
public MySQL_CreateAccount(playerid,password[])
{
    GetPlayerName(playerid,PlayerName,25);
    format(s_Query,sizeof(s_Query),"INSERT INTO `accounts` (name,password,level,money,bank,skin) VALUES ('%s','%s','2','4500','0','240');",PlayerName,password);
    mysql_function_query(s_MySQL,s_Query,true,"s@MySQL_CreateAccount","s",playerid);
    printf("Creating: %s",PlayerName);
    return 1;
}

public s@MySQL_CreateAccount(playerid)
{
    print("Before message");
    SendClientMessage(playerid,-1,"Successfully registered, please wait.");
    print("after message");
    MySQL_LoadAccount(playerid);
   
    return 1;
}
Did this debug. this is the outcome:
Quote:

Frank_Albertini has joined the server
Checking for: Frank_Albertini
Showed Register to 1,s@MySQL_CheckAccount
Creating: Frank_Albertini

Reply
#8

I've fixed it, thanks for the help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)