SA-MP Forums Archive
Crashing on array set - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Crashing on array set (/showthread.php?tid=138614)



Crashing on array set - Mikep. - 02.04.2010

account[playerid][pColor] = strval(querystring);

is crashing my command. Any clues why?

Here's more of the code:

pawn Код:
new resultline[64];
format(querystring,sizeof(querystring),"SELECT Email,Color,Level,Beta,Score,Cash,NOS,PMA,ClickMode,NoTele,Ads,DMTUT,X,Y,Z,A,I,Jailed,SAVEX,SAVEY,SAVEZ,SAVEA,SAVEINT FROM users WHERE Name = '%s' LIMIT 1",pName[playerid]);
mysql_query(querystring);
mysql_store_result();
mysql_fetch_row_format(resultline);
mysql_fetch_field_row(querystring,"Color");
account[playerid][pColor] = strval(querystring);



Re: Crashing on array set - dice7 - 02.04.2010

Print the string before attempting to parse it with strval


Re: Crashing on array set - Mikep. - 02.04.2010

I'm going to change over to the pvar system.