SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/07/2019, 09:08 PM   #1
playstores
Big Clucker
 
Join Date: Feb 2018
Posts: 148
Reputation: 3
Default Format or STRMID ?

format(FrakInfo[i][FrakName], sizeof(FrakInfo[i][FrakName]), "%s",Fracs[i]);
strmid(FrakInfo[i][FrakName], Fracs[i], string, 0, strlen(string), 255);

Tried both but nothing works, whats wrong?
playstores is offline   Reply With Quote
Old 16/07/2019, 11:54 PM   #2
Mugala
High-roller
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: Georgia, Tbilisi
Posts: 1,065
Reputation: 50
Default Re: Format or STRMID ?

what are you trying to do?
__________________
Coding in 8 languages including Pawn, C#, C++ and SQL.
Available for hiring.

If you have a coding question or need an assistance in a code, just PM me.
If you want me to create something for you, here is a Discord Mugala#5651

Currently helping Community members in a coding.
Mugala is offline   Reply With Quote
Old 17/07/2019, 07:13 AM   #3
Calisthenics
Gangsta
 
Join Date: May 2018
Posts: 676
Reputation: 110
Default Re: Format or STRMID ?

This is wrong
pawn Code:
sizeof(FrakInfo[i][FrakName])

If you want to copy strings, use strcpy
pawn Code:
#if !defined strcpy
    #define strcpy(%0,%1) strcat((%0[0] = '\0', %0), %1)
#endif
pawn Code:
strcpy(FrakInfo[i][FrakName], Fracs[i], /* LENGHT_OF_FRAK_NAME */);
Calisthenics is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with strmid and format. shady001 Scripting Help 0 05/01/2013 08:50 PM
Little help with strmid FireCat Scripting Help 2 07/09/2011 11:56 AM


All times are GMT. The time now is 04:19 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.