|
I have a database and a weapon, and i found something weird, so tell me if i'm doing something wrong or if it's the DB's fault...
When i try setting a string inside my array it gets weird, the database's flags say that nothing changed but when i echo it, it's returning the good value...anyway, here's the script
//in the database db_test//
function onCreated() {
this.test1={1,2,{{"test",2},1},3};
}
//
//in a weapon named test
function onActionserverside() {
findnpc("db_test").test1[2][0][0]="not test";
this.returntoclient=findnpc("db_test").test1;
echo(findnpc("db_test").test1[2][0][0]);
triggeraction(0,0,"clientside","test",this.returnt oclient);
}
//#CLIENTSIDE
function onCreated() {
triggeraction(0,0,"serverside","test",NULL);
}
function onActionClientside() {
player.chat=params[0][2][0][0];
}
//
//now, after reseting the database and running the script
//in the test weapon, it echoes "not test" on the rc, but
//if i check the database's flags, it's still "test", and
//the player's chat is "test".
So... what's wrong? |