sscanf?? - 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: sscanf?? (
/showthread.php?tid=183967)
Why wont this string working? -
DarrenReeder - 17.10.2010
Hello..
this is my code:
pawn Код:
new org[128];
if(orgID>0) { org = orgStats[orgID][fName]; }
else { org = "None"; }
printf("Org Name: %s, %s", orgStats[orgID][fName], org);
When i use the org variable it just shows BLANK space.. and it cuts off the rest of the string..
the org Index is 128 long ,because thats how long fName is (temporarily..) when i use printf, the orgStats[orgID][fName] it works perfect, the org blanks completely..
Any ideas?
Re: sscanf?? -
LarzI - 17.10.2010
With the new sscanf, u = players and bots, but yeah, still it would get the ID of the name entered.
Re: sscanf?? -
DarrenReeder - 17.10.2010
new question
Re: sscanf?? -
LarzI - 17.10.2010
You must either format (not recommended) or use strmid to insert the name into org.
pawn Код:
new org[128];
if(orgID>0) { strmid(org, orgStats[orgID][fName], 0, 255); }
else { strmid(org, "None", 0, 255); }
printf("Org Name: %s, %s", orgStats[orgID][fName], org);