strmid returns <null>
#1

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]));
Reply
#2

I didn't even look at the code but try format.
Reply
#3

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
Reply
#4

You also can to not make the %s.
pawn Код:
format(JobInfo[Missions][Name],sizeof(something),Dateien[d]);
Reply
#5

oh thanks. I thought i need the %s. Thanks for your tip.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)