Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

[ERROR] cache_set_active: invalid cache id '0'

Whatis going on to these code

ID
d6ouivfilegovhg7bcfg
author
zow's avatar

Zow

@zow


View profile
Copy link
  Report member
started
Jul 18, 2019
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Pawn Scripting
[ERROR] cache_set_active: invalid cache id '0'
zow's avatar

Zow

@zow


View profile
Copy link
  Report member
• 6y
Pawn Scripting

[ERROR] cache_set_active: invalid cache id '0'

pawn

Whatis going on to these code



Orginal code from:?https://github.com/pBlueG/SA-MP-MySQ...stem-cache.pwn



[19:02:17] [ERROR] cache_set_active: invalid cache id '0' 

[19:02:17] [ERROR] cache_get_value_name_int: no active cache 

[19:02:17] [ERROR] cache_get_value_name_int: no active cache 

[19:02:17] [ERROR] cache_get_value_name_int: no active cache 

[19:02:17] [ERROR] cache_get_value_name_float: no active cache 

[19:02:17] [ERROR] cache_get_value_name_float: no active cache 

[19:02:17] [ERROR] cache_get_value_name_float: no active cache 

[19:02:17] [ERROR] cache_get_value_name_float: no active cache 

[19:02:17] [ERROR] cache_get_value_name_int: no active cache 

[19:02:17] [ERROR] cache_get_value_name_int: no active cache 

[19:02:17] [ERROR] cache_get_value_name_int: no active cache 

[19:02:17] [ERROR] cache_delete: invalid cache id '0' ?





 ? ? ? ?case DIALOG_LOGIN: 

 ? ? ? ?{ 

? ? ? ? ? ?if (!response) return Kick(playerid); 



? ? ? ? ? ?new hashed_pass[65]; 

? ? ? ? ? ?SHA256_PassHash(inputtext, Player[playerid][Salt], hashed_pass, 65); 



? ? ? ? ? ?if (strcmp(hashed_pass, Player[playerid][Password]) == 0) 

? ? ? ? ? ?{ 



? ? ? ? ? ? ? ?// sets the specified cache as the active cache so we can retrieve the rest player data 

? ? ? ? ? ? ? ?cache_set_active(Player[playerid][Cache_ID]); 



? ? ? ? ? ? ? ?AssignPlayerData(playerid); 



? ? ? ? ? ? ? ?// remove the active cache from memory and unsets the active cache as well 

? ? ? ? ? ? ? ?cache_delete(Player[playerid][Cache_ID]); 

? ? ? ? ? ? ? ?Player[playerid][Cache_ID] = MYSQL_INVALID_CACHE; 



? ? ? ? ? ? ? ?KillTimer(Player[playerid][LoginTimer]); 

? ? ? ? ? ? ? ?Player[playerid][LoginTimer] = 0; 

? ? ? ? ? ? ? ?Player[playerid][IsLoggedIn] = true; 

? ? ? ? ? ? ? ?TogglePlayerSpectating(playerid, false); 



? ? ? ? ? ? ? ?// spawn the player to their last saved position after login 

? ? ? ? ? ? ? ?SetSpawnInfo(playerid, NO_TEAM, DEFAULT_SKIN, Player[playerid][Pos_X], Player[playerid][Pos_Y], Player[playerid][Pos_Z], Player[playerid][Pos_A], 0, 0, 0, 0, 0, 0); 

? ? ? ? ? ? ? ?SpawnPlayer(playerid); 

? ? ? ? ? ?} 

? ? ? ? ? ?else 

? ? ? ? ? ?{ 

? ? ? ? ? ? ? ?Player[playerid][LoginAttempts]; 



? ? ? ? ? ? ? ?if (Player[playerid][LoginAttempts] >= 3) 

? ? ? ? ? ? ? ?{ 

? ? ? ? ? ? ? ? ? ?ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "[Login step]", "?س??????ʼ?ҹ?Դ?֧ 3 ?????, ?֧ⴹ?к?????͡?ҡ???????????", "?Դ", ""); 

? ? ? ? ? ? ? ? ? ?DelayedKick(playerid); 

? ? ? ? ? ? ? ?} 

? ? ? ? ? ? ? ?else ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "[Login step]", "???ʼ?ҹ????١??ͧ!\n**??س???????ʼ?ҹ????????????????!", "???????", "¡??ԡ"); 

? ? ? ? ? ?} 

? ? ? ?} 



AssignPlayerData(playerid) 

{ 

? ?cache_get_value_int(0, "ID", Player[playerid][ID]); 



? ?cache_get_value_int(0, "Kills", Player[playerid][Kills]); 

? ?cache_get_value_int(0, "Deaths", Player[playerid][Deaths]); 



? ?cache_get_value_float(0, "PosX", Player[playerid][Pos_X]); 

? ?cache_get_value_float(0, "PosY", Player[playerid][Pos_Y]); 

? ?cache_get_value_float(0, "PosZ", Player[playerid][Pos_Z]); 

? ?cache_get_value_float(0, "PosA", Player[playerid][Pos_A]); 

? ? 

? ?cache_get_value_int(0, "Interior", Player[playerid][Interior]); 

? ?cache_get_value_int(0, "Skin", Player[playerid][Skin]); 

? ?cache_get_value_int(0, "Account", Player[playerid][Account]); 

? ?return 1; 

} ?





error spot after logged in every login

0 likes0 replies

    Please sign up or log in to reply