error 022: must be lvalue (non-constant)
#1

Code:
Код:
if(pInfo[playerid][FactionRank] == 1) FactionRank = cache_get_field_content(0,"Rank 1");
Error:
Код:
error 022: must be lvalue (non-constant)
Reply
#2

Fail delete my post
Reply
#3

https://sampwiki.blast.hk/wiki/MySQL/R33..._field_content

That's not the way to use cache_get_field_content. This is:

pawn Код:
cache_get_field_content(row, field to pull data from, string to store data in);
Like so:
pawn Код:
if(pInfo[playerid][FactionRank] == 1) cache_get_field_content(0,"Rank 1", FactionRank);
Tell me if it solves your error.

Quote:
Originally Posted by Wizzard2H
Посмотреть сообщение
Код:
if(pInfo[playerid][FactionRank] == 1) FactionRank == cache_get_field_content(0,"Rank 1");
Try this?
Not sure if trolling or serious. In case you're serious, read this: https://sampwiki.blast.hk/wiki/Control_Structures#Operators
Reply
#4

This should work:
pawn Код:
if(pInfo[playerid][FactionRank] == 1) cache_get_field_content(0, "Rank 1", FactionRank);
Edit: Posted too late, nevermind.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)