Raised This Month: $ Target: $400
 0% 

Solved Remove last character from string


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 11-21-2022 , 09:46   Remove last character from string
Reply With Quote #1

First thing that came in my mind was:
PHP Code:
public test(id)
{
    
//MagicNumbers™
    
new szBuffer[190], szBuffer2[4], len;

    for(new 
i10i++)
    {
        
len += formatex(szBuffer2charsmax(szBuffer2), " %i,"i);
        
add(szBuffercharsmax(szBuffer), szBuffer2);
    }

    
szBuffer[len 1] = ""// Marked

    
console_print(id"%s"szBuffer);

But marked string gives me an error 006: must be assigned to an array
Any good way to solve this?
__________________
Now working on: Side Weapons (Very lazy, tbh)
Avatar source: https://bit.ly/3BAk19g
Discord: kww#9951

Last edited by kww; 11-21-2022 at 10:09.
kww is offline
 



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

Forum Jump


All times are GMT -4. The time now is 15:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode