#1

Код:
printf("PAGE: %i", SetPVarInt(playerid, "Browsing_Page", GetPVarInt(playerid, "Browsing_Page") +2));
This prints PAGE: 0 wtf?
Reply
#2

https://sampwiki.blast.hk/wiki/SetPVarInt
doesnt return a value, so its returning 0.
try:
Код:
SetPVarInt(playerid, "Browsing_Page", GetPVarInt(playerid, "Browsing_Page") +2));
printf("PAGE: %i", GetPVarInt(playerid, "Browsing_Page");
Reply
#3

pawn Код:
SetPVarInt(playerid, "Browsing_Page", GetPVarInt(playerid, "Browsing_Page") +2);
printf("PAGE: %i", GetPVarInt(playerid, "Browsing_Page"));
Still it prints PAGE: 0
Reply
#4

hm.. formatting before is not needed, we know that, but anyways, formatting maybe? you know that this will work for sure, so:
Код:
new string[128];
format(string,sizeof(string),"PAGE: %i",GetPVarInt(playerid, "Browsing_Page"));
printf(string);
if that still prints, 0, then idk
Reply
#5

Quote:
Originally Posted by Babul
Посмотреть сообщение
hm.. formatting before is not needed, we know that, but anyways, formatting maybe? you know that this will work for sure, so:
Код:
new string[128];
format(string,sizeof(string),"PAGE: %i",GetPVarInt(playerid, "Browsing_Page"));
printf(string);
if that still prints, 0, then idk
printf does what you posted above
Reply
#6

suggesting to search your entire script for the string '"Browsing_Page"' wouldn't help, its not set anywhere i bet. make sure that you SetPVarInt(playerid,"Browsing_Page",9); or sort of (in a separate command CMD:test maybe), to be absoludetly sure it contains NOT 0. it cant be real that all formatting is for nothing. the bug has to be somewhere else...
Reply
#7

already did that, no results. any ideas?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)