Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

memset tag mismatch

$
0
0
Hey, I've found useful function from Slice called memset.

PHP Code:

stock memset(variable[], cellsvalue) {
    new 
address;

    
#emit LOAD.S.pri  variable
    #emit STOR.S.pri  address

    
raw_memset(addresscellsvalue);
}

stock raw_memset(addresscellsvalue) {
    new 
param_adr;

    
#emit LCTRL       6
    #emit MOVE.alt
    #emit LCTRL       0
    #emit ADD
    #emit MOVE.alt
    #emit LCTRL       1
    #emit SUB.alt
    #emit ADD.C       92
    #emit STOR.S.pri  param_adr
    #emit LOAD.S.pri  cells
    #emit SHL.C.pri   2
    #emit SREF.S.pri  param_adr

    #emit LOAD.S.alt  address
    #emit LOAD.S.pri  value
    #emit FILL        0


So I decided to use it here instead of loop setting all values to -1, but it outputs tag mismatch warning. When I tried to pass PlayerText:-1, warning still persists. Seems to be working fine in game though.
PHP Code:

enum E_MDC
{
    
PlayerText:E_MDC_TEXTDRAW[MDC_TEXTDRAW_SIZE],
    
//rest
}

memset(MDC_g_sPlayer[playerid][E_MDC_TEXTDRAW], MDC_TEXTDRAW_SIZE, -1); 


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>