SA-MP Forums Archive
wierd - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: wierd (/showthread.php?tid=199710)



wierd - armyoftwo - 16.12.2010

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


Re: wierd - Babul - 16.12.2010

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");



Re: wierd - armyoftwo - 16.12.2010

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


Re: wierd - Babul - 16.12.2010

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


Re: wierd - armyoftwo - 16.12.2010

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


Re: wierd - Babul - 16.12.2010

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...


Re: wierd - armyoftwo - 17.12.2010

already did that, no results. any ideas?