12.01.2019, 17:15
Quote:
stock CreateOrganisation(organisation[],playerid) { new query[256]; format(query,sizeof(query),"YYou created Organisation '%s' sucessfully.",organisation); SendClientMessage(playerid,COLOR_LIGHTBLUE,query); GivePlayerMoneySave(playerid, -500000); format(query,sizeof(query),"INSERT INTO organisations (OrgName,OrgOwner,OrgMotto) VALUES ('%s','%s','%s')",organisation,GetName(playerid)," Nothing"); mysql_function_query(mysqlcon,query,true,"is","OnO RGCreated",playerid,organisation); return 1; } forward OnORGCreated(playerid,orgnmame[]); public OnORGCreated(playerid,orgnmame[]) { new id = mysql_insert_id(); PlayerInfo[playerid][pOrgMember] = id; PlayerInfo[playerid][pOrgLeader] = id; OrgInfo[id][OrgCreatet] = 1; strmid(OrgInfo[id][OrgOwner],PlayerInfo[playerid][Name],0,strlen(PlayerInfo[playerid][Name]),24); strmid(OrgInfo[id][OrgMotto],"Noting",0,strlen("Nothing"),128 ); strmid(OrgInfo[id][OrgName], orgnmame, 0, MAX_PLAYER_NAME, MAX_PLAYER_NAME); return 1; } |
"pOrgMember" & "pOrgLeader" just stays 0
But the INSERT is sucessfull & the id is KEY & AUTO INCREMENT
Whats the problem?