strmid returns <null> - 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 returns <null> (
/showthread.php?tid=88517)
strmid returns <null> -
AlexandA - 27.07.2009
Hey, i have a problem with strmid.
I want to take the string "s" to the string "JobInfo[id][Name]" But when i print JobInfo[id][Name], it prints <null>.
Код:
strmid(JobInfo[Missions][Name],s,0,strlen(JobInfo[Missions][Name]),strlen(JobInfo[Missions][Name]));
Re: strmid returns <null> -
MenaceX^ - 27.07.2009
I didn't even look at the code but try format.
Re: strmid returns <null> -
AlexandA - 27.07.2009
I tried it allready, but i became a few of errors:
Код:
format(JobInfo[Missions][Name],sizeof(JobInfo[Missions][Name]),"%s",Dateien[d]);
Quote:
D:\Dokumente und Einstellungen\Alexander\Eigene Dateien\Work..pwn(382) : error 001: expected token: "]", but found "-identifier-"
D:\Dokumente und Einstellungen\Alexander\Eigene Dateien\Work.pwn(382) : warning 215: expression has no effect
D:\Dokumente und Einstellungen\Alexander\Eigene Dateien\Work.pwn(382) : error 001: expected token: ";", but found "]"
D:\Dokumente und Einstellungen\Alexander\Eigene Dateien\Work..pwn(382) : error 029: invalid expression, assumed zero
D:\Dokumente und Einstellungen\Alexander\Eigene Dateien\Work..pwn(382) : fatal error 107: too many error messages on one line
|
Edit: Okay i make now:
Код:
format(JobInfo[Missions][Name],60,"%s",Dateien[d]);
and it compiles without a problem or errors.
Thanks for help and sorry for my bad english
Re: strmid returns <null> -
MenaceX^ - 27.07.2009
You also can to not make the %s.
pawn Код:
format(JobInfo[Missions][Name],sizeof(something),Dateien[d]);
Re: strmid returns <null> -
AlexandA - 27.07.2009
oh thanks. I thought i need the %s. Thanks for your tip.