[Info]: Load data with sscanf2 / on MySQL
#10

It jumps over it, doesn't load it.
Let's suppose that in your MySQL table you have 3 fields:
-name (varchar)
-sex (varchar - let's suppose it'd be 10 big cells in the enum to understand sscanf)
-age (integer)


And in your GM your enum has just 2 variables. Name and age:
pawn Код:
enum Vars {
 name[24],
 age
};
new data[MAX_PLAYERS][Vars];
//-----------
sscanf(query,"e<p<|>s[24]{s[10]}i",data[playerid][name],data[playerid][age]); //it didn't load sex because we don't have variable to asign the value.
Best regards!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)