Jump to content

[SannyBuilder]Problema script comparare id-uri.


Mihay.
 Share

Recommended Posts

Descriere problema: In momentul in care incerc sa compar doua variabile intre ele primesc eroarea Incorrect expression 21@ == 2@.
One of the variables has an unknown type, or the operands are incompatible. , desi am folosit mesaje in chat pentru a ma asigura ca sunt de acelasi fel.

Poze / Video (optional): spacer.png

Cod (sursa pe baza caruia sa ajutam, daca e cazul):

:test
SAMP.IsCommandTyped(20@)
if
    0AD4: 20@ = scan_string 20@ format "%d" 21@
then
    0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
if
    21@ == 2@
then
    chatmsg "id-ul tastat este acelasi cu id-ul tau" -1
else
    chatmsg "id-ul tau nu este acelasi cu id-ul tastat" -1 
end
else
    print "~y~/test + <id jucator>" 2000
end
SAMP.CmdRet()

Alte precizări:

codul de test este acesta

 

:test
SAMP.IsCommandTyped(20@)
if
    0AD4: 20@ = scan_string 20@ format "%d" 21@
then
    0B2B: samp 2@ = get_player_id_by_actor_handle $PLAYER_ACTOR
    chatmsg "id-ul tastat este %d" -1 21@
    chatmsg "id-ul tau este %d" -1 2@ 
else
    print "~y~/test + <id jucator>" 2000
end
SAMP.CmdRet()
 

Edited by Mihay.
Link to comment
Share on other sites

1 hour ago, Nic said:

CTRL+ALT+2 in Sanny Builder si cauta "== int" sau "> int" etc. 

 

003B:   2@ == 21@  // (int)
 

A mers, sarumana si un picior                 Se poate da close topic.

Link to comment
Share on other sites

  • Tupi locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.