strmid not working ? - 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: strmid not working ? (
/showthread.php?tid=259769)
strmid not working ? -
und3rcore - 05.06.2011
Fixed.
Re: strmid not working ? -
und3rcore - 05.06.2011
Fixed.
Re: strmid not working ? -
Gamer_Z - 05.06.2011
give the whole code, how is tmp defined?
Re: strmid not working ? -
und3rcore - 05.06.2011
Fixed.
Re: strmid not working ? -
Gamer_Z - 05.06.2011
well PAWN can only work with intergers, so when you do new tmp; you can only save 1 character. when you do new tmp[256]; you can save 256 characters (including the EOS aka '\0' aka end of string..?)
and you cannot do string = string in all cases.
the best metthod is to use format();
https://sampwiki.blast.hk/wiki/Format
I see the code and yes um you need to change a few things.
strmid accepts only strings (multi variables, var[*]) and after that a few intergers.
https://sampwiki.blast.hk/wiki/Strmid
Re: strmid not working ? -
und3rcore - 05.06.2011
Fixed.
Re: strmid not working ? -
Gamer_Z - 05.06.2011
well remove this line:
new tmp3 = FamilyInfo[family][FamilyLeader];
and change new tmp; to new tmp[(max character count)] ex new tmp[128];
That's all I can say.. I have not the whole code so I am limited with help :P