Posts: 775
Threads: 78
Joined: Dec 2014
Hi, so after I added the clothes part of /buy in a store, it gave me debug errors and the command didn't work in game.
http://prntscr.com/bst9sp
Full /buy command;
http://pastebin.com/qsLpRST4
I did ******, and I do understand the problem, but couldn't find out why in my code.
Posts: 1,208
Threads: 36
Joined: Apr 2015
Problem here is
PHP код:
format(nFormat, 128, "%s", Stores[GetPlayerVirtualWorld(playerid)+500][Name]);
PHP код:
//virtualworld = 509
Stores[ GetPlayerVirtualWorld(playerid)+500 ] //index 509 + 500 = 1009
//I think you wanted to do
//virtualworld = 509
Stores[ GetPlayerVirtualWorld(playerid)-500 ] //index 509 - 500 = 9
Posts: 775
Threads: 78
Joined: Dec 2014
Quote:
Originally Posted by AbyssMorgan
Problem here is
PHP код:
format(nFormat, 128, "%s", Stores[GetPlayerVirtualWorld(playerid)+500][Name]);
PHP код:
//virtualworld = 509
Stores[ GetPlayerVirtualWorld(playerid)+500 ] //index 509 + 500 = 1009
//I think you wanted to do
//virtualworld = 509
Stores[ GetPlayerVirtualWorld(playerid)-500 ] //index 509 - 500 = 9
|
Nope, stores virtual world are 500+, I believe I meant only getplayervw, Gonna test this.
Edit; You're right, thanks.